当前位置:网站首页>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 .
边栏推荐
- [database] must know at the end of the term ----- Chapter VII database integrity
- LeetCode之最大正方形(暴力求解和动态规划求解)
- WPF cannot find resource file problem
- surging作者出具压测结果
- SQL interface switching cannot obtain focus
- Leetcode7 DFS + dynamic programming + double pointer
- What does the project set price mean?
- In tech 2022 | Intel technology product innovation quick view
- Xcode11 add a boot page (the launch images source option is missing after the upgrade)
- Technical writing guide for programmers to leave work early
猜你喜欢
随机推荐
SQL interface switching cannot obtain focus
AttributeError: ‘NoneType‘ object has no attribute ‘sort‘
Software testing - Advanced
小程序毕设作品之微信电子书阅读小程序毕业设计(5)任务书
C# 构造函数(Constructors)简单讲解
Introduction to PLC OPC information model (DI, PLCopen nodesets)
Wechat e-book reading applet graduation design of applet completion works (3) background function
leetcode209. 长度最小的子数组
Machine learning 10: Integrated Learning
机器学习10:集成学习
[wechat applet] super easy to understand conditional rendering and list rendering
WPF cannot find resource file problem
C # use this keyword to concatenate constructor to call method
Avplayer adds playback progress monitoring
B+树存储过程、触发器、Substring和substr的区别及Truncate和Delete的区别
Simple explanation of C constructors
Data types of basic knowledge of C language
Intensive reading series of papers
OSPF routing control, anti ring related knowledge
[Huang ah code] Introduction to MySQL - 5. Database tips: a single column group by will, and multiple columns?









