In the worker_connections configuration in the nginx configuration, the larger I set it, the slower it feels?
PHP中文网
PHP中文网 2017-06-06 09:54:32
0
4
964

My server configuration is as follows

1. When I set worker_connections 1024; I used webbench to do stress testing, and the data returned was like this!

2. When I set worker_connections 10240; I used webbench to do stress testing, and the returned data is like this!

To summarize, it feels like the speed has dropped by 4 times

Can someone help me analyze it?

PHP中文网
PHP中文网

认证0级讲师

reply all(4)
巴扎黑

If no error is reported, it is best to make worker_processes*worker_connections/4 smaller than the total number of files opened by system processes

伊谢尔伦

Thanks for the invitation!

Please read the article in detail
http://liuqunying.blog.51cto....

漂亮男人

ulimit -n What is it?
If not, set it up
ulimit -n 65535

淡淡烟草味

There may be something wrong with your test result

Calculate, the single page sizes for the two requests are:
41381 bytes/sec * 60 / 31234 pages/min = 80 bytes/page
10556 bytes/sec * 60 / 1607 pages/min = 394 bytes/page

If the two tests are on the same page, it is obvious that many requests are abnormal.

So, you have to check if there is anything wrong with the testing method first.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template