当前位置:网站首页>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 =
new
MultithreadEventLoopGroup(1);``IEventLoopGroup workerGroup =
new
MultithreadEventLoopGroup();``//Default eventLoopCount is Environment.ProcessorCount * 2``var
bootstrap =
new
ServerBootstrap();
if
(AppConfig.ServerOptions.Libuv)``{``var
dispatcher =
new
DispatcherEventLoopGroup();``bossGroup = dispatcher;``workerGroup =
new
WorkerEventLoopGroup(dispatcher);``bootstrap.Channel();``}``else``{``bossGroup =
new
MultithreadEventLoopGroup(1);``workerGroup =
new
MultithreadEventLoopGroup();``bootstrap.Channel();``}``var
workerGroup1 =
new
SingleThreadEventLoop();``// Declare business threads ``bootstrap``.Option(ChannelOption.SoBacklog, AppConfig.ServerOptions.SoBacklog)``.ChildOption(ChannelOption.Allocator, PooledByteBufferAllocator.Default)
.Group(bossGroup, workerGroup)``.ChildHandler(``new
ActionChannelInitializer(channel =>``{``var
pipeline = channel.Pipeline;``pipeline.AddLast(``new
LengthFieldPrepender(4));``pipeline.AddLast(``new
LengthFieldBasedFrameDecoder(``int``.MaxValue, 0, 4, 0, 4));``pipeline.AddLast(workerGroup1,
"HandlerAdapter"``,
new
TransportMessageChannelHandlerAdapter(_transportMessageDecoder));``// Add business thread processing ``// Add business thread processing pipeline.AddLast(workerGroup1, "ServerHandler", new ServerHandler(async (contenxt, message) =>
{``var
sender =
new
DotNettyServerMessageSender(_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 .
边栏推荐
- JS模态框
- surging作者出具压测结果
- Wechat e-book reading applet graduation project (8) graduation project thesis template
- C# 详解out输出参数
- Wechat Online Education video on Demand Learning of applet Graduation Design (3) Background Function
- Eas (energy aware scheduling) green energy-saving scheduler
- STM32——定时器系列(二)通用定时器
- Intel + Lenovo jointly launched open source cloud solutions
- About the problem of database, the concept of uniqueness and non repetition
- [database] must know at the end of the term ----- Chapter 2 relational data model
猜你喜欢
若依框架包名修改器
Ftxui basic notes (botton button component Foundation)
OSPF basic optimization
Wechat e-book reading applet graduation project (8) graduation project thesis template
JS模态框
小程序毕设作品之微信电子书阅读小程序毕业设计(3)后台功能
Machine learning 11: cost sensitive learning
HCR慧辰北坡而行,一只游入数字营销服务的巨兽
Insert the laptop into the headset and still play it out (the personal test is valid)
笔记本电脑插入耳机仍然外放(亲测有效)
随机推荐
06 MAUI,WPF使用 MVVM Toolkit 框架 构建 MVVM 程序
C language explanation series - practice and consolidation of circular sentences, explanation of binary search
Intensive reading series of papers
ffmpeg中AVFrame\AVPacket与自己的数据交互
Skillfully use enterprise network disk to collect reports or summaries
ospf综合实验
C# 详解out输出参数
C# 字符串(string)常用方法
【微信小程序】超易懂的条件渲染和列表渲染
Openresty as a static resource server
使用kaggle跑李宏毅机器学习作业
String extension method usage
Find the central subscript of the array
Android kotlin自定义自动换行LinearLayout
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
AttributeError: ‘NoneType‘ object has no attribute ‘sort‘
V4l2 learning materials collection
leetcode977. Square of ordered array
若依框架包名修改器
[database] must know and be able at the end of the term ----- Chapter 10 database programming