当前位置:网站首页>The author of surging issued the pressure test results
The author of surging issued the pressure test results
2022-07-19 04:28:00 【u012804784】
High quality resource sharing
| Learning route guidance ( Click unlock ) | Knowledge orientation | Crowd positioning |
|---|---|---|
| 🧡 Python Actual wechat ordering applet 🧡 | Progressive class | This course is python flask+ Perfect combination of wechat applet , From the deployment of Tencent to the launch of the project , Create a full stack ordering system . |
| Python Quantitative trading practice | beginner | Take you hand in hand to create an easy to expand 、 More secure 、 More efficient quantitative trading system |
Preface
First respond @wen-wen Pressure test report posted , I also put the problems I encountered in the pressure test with customers , And the pressure measurement results are posted , This result is provided by the customer . There will be no fraud
Question 1 :Task.Run Use with caution
First of all, the latest community version has put Task.run All have been removed ( It includes kestrel RPC Call the service ), When your program has time-consuming business processing ,Task Can improve performance , But when it doesn't take time , Maybe you can't improve performance , Instead, it becomes a bottleneck , Because when a batch Task.run Not finished , A new batch of requests has come , It will block and cause cpu The rise of , So before netty Of ServerHandler Use in task.run , When testing services without business , Because they are nanosecond responses , So it created task The block , Perform 10000 times of cyclic pressure measurement ,CPU Has been 20% about , The follow-up has passed netty Business thread of ,CPU Has been stable in 6% about , The code is as follows
| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 | if(_logger.IsEnabled(LogLevel.Debug))``_logger.LogDebug($``" Ready to start the service host , Monitor address :{endPoint}."``); IEventLoopGroup bossGroup =newMultithreadEventLoopGroup(1);``IEventLoopGroup workerGroup =newMultithreadEventLoopGroup();``//Default eventLoopCount is Environment.ProcessorCount * 2``varbootstrap =newServerBootstrap(); if(AppConfig.ServerOptions.Libuv)``{``vardispatcher =newDispatcherEventLoopGroup();``bossGroup = dispatcher;``workerGroup =newWorkerEventLoopGroup(dispatcher);``bootstrap.Channel();``}``else``{``bossGroup =newMultithreadEventLoopGroup(1);``workerGroup =newMultithreadEventLoopGroup();``bootstrap.Channel();``}``varworkerGroup1 =newSingleThreadEventLoop();``// Declare business threads ``bootstrap``.Option(ChannelOption.SoBacklog, AppConfig.ServerOptions.SoBacklog)``.ChildOption(ChannelOption.Allocator, PooledByteBufferAllocator.Default).Group(bossGroup, workerGroup)``.ChildHandler(``newActionChannelInitializer(channel =>``{``varpipeline = channel.Pipeline;``pipeline.AddLast(``newLengthFieldPrepender(4));``pipeline.AddLast(``newLengthFieldBasedFrameDecoder(``int``.MaxValue, 0, 4, 0, 4));``pipeline.AddLast(workerGroup1,"HandlerAdapter"``,newTransportMessageChannelHandlerAdapter(_transportMessageDecoder));``// Add business thread processing ``// Add business thread processing pipeline.AddLast(workerGroup1, "ServerHandler", new ServerHandler(async (contenxt, message) =>{``varsender =newDotNettyServerMessageSender(_transportMessageEncoder, contenxt);``await OnReceived(sender, message);``}, _logger));``}));``try``{``_channel = await bootstrap.BindAsync(endPoint);``if(_logger.IsEnabled(LogLevel.Debug))``_logger.LogDebug($``" Service host started successfully , Monitor address :{endPoint}."``);``}``catch``{``_logger.LogError($``" Service host failed to start , Monitor address :{endPoint}. "``); } } |
Question two : Check the dominant frequency , Check the number
First of all, the customer started the test with a home computer , He has been unable to measure , Talking and using jmeter Yes? 2000 Just timeout 了 , I learned later that his computer is 4 nucleus , Main frequency 1.8, Memory 32G, Later, tell him that you need a high-frequency or multi-core clean computer to meet your expectations .
| 1 | |
Question 3 : Check the fusing strategy
Check MaxConcurrentRequests,ExecutionTimeoutInMilliseconds Wait for settings

Customer results
Add a database to a single table , cpu Keep it all the time 30%, May be because ingress The setting relationship can only be measured 4000

Personal test results
No business stress test :
use httpkestrel Pressure measurement can achieve 2w/s, rpc You can achieve 10w/s
rpc Everyone can test , Download through the community version , Enable server, Turn on multiple client Carry out pressure test , You can tell me if you have any questions
summary
surging It is developing towards Pingtai , The prototype of community version should be launched at the end of the year , Please pay more attention .
边栏推荐
- Deconstruction of typescript array / object / string / function parameters
- 小程序畢設作品之微信在線教育視頻點播學習小程序畢業設計(3)後臺功能
- Wechat online education video on demand learning applet graduation design (3) background function
- [ruoyi Vue plus] learning notes 30 - redisson (VI) bounded blocking queue (redisson source code + Lua script)
- JS模态框
- [seventh issue of notebook series] download and use of openvino pre training model
- 64. Minimum path sum: given an M x n grid containing non negative integers, please find a path from the upper left corner to the lower right corner, so that the sum of the numbers on the path is the m
- leetcode977. Square of ordered array
- By voting for the destruction of STI by Dao, seektiger is truly community driven
- minimum spanning tree
猜你喜欢

ospf综合实验

Optimization and configuration of OSPF

Introduction to PLC OPC information model (DI, PLCopen nodesets)

Wechat e-book reading of applet completion works (7) Interim inspection report

Data types of basic knowledge of C language

HCR慧辰北坡而行,一只游入数字营销服务的巨兽

mqant 深入分析

Xdc 2022 Intel technology special session: Intel Software and hardware technology builds the cornerstone of cloud computing architecture

Find the central subscript of the array

Leetcode7 DFS + dynamic programming + double pointer
随机推荐
OSPF basic optimization
AttributeError: ‘NoneType‘ object has no attribute ‘sort‘
Build a portrait matting server based on openvino model server
Intel experts share: how to program efficiently on XPU architecture? Zhiqiang Research Institute
机器学习09:无监督学习
模拟服务器进行请求
Smart fan system based on STM32F103
Technical writing guide for programmers to leave work early
CAD video course recommendation station B
详解Pod和容器资源管理和分配(CPU和内存分配,临时存储管理)
结构体通过成员变量获取主结构体地址(struct)
Wechat e-book reading applet graduation design of applet completion works (2) applet function
Wechat e-book reading of small program graduation project (4) opening report
Small program completion work wechat online education video on demand learning small program graduation design (2) small program function
Graphic verification code verification
Touchid and faceid~1
小程序畢設作品之微信在線教育視頻點播學習小程序畢業設計(3)後臺功能
SQL interface switching cannot obtain focus
How to filter viruses / spam more effectively!
微信附近的人小程序怎么开(开通附近小程序的方法)