According to some people on the web said Nginx configuration:
The maximum number of connections supported by Nginx is related to the following factors:
Worker_processes 11024x768-A display open file:1024x768
But after testing, the results are as follows:
Cpu:6 nucleus ( found by Cat/proc/cpuinfo |grep "cores" |uniq command )
Maximum system connections: 1024 (from Ulimit-a)
Test concurrent Machine: 1, Access test with siege tool
Worker_processes |
Worker_connections |
Actual number of connections |
2 |
1024 |
1018 |
3 |
341 |
722 |
2 |
512 |
1020 |
2 |
32 |
64 |
3 |
32 |
95 |
4 |
32 |
96 |
5 |
32 |
67 |
6 |
32 |
68 |
6 |
32 |
128 |
6 |
64 |
194 |
6 |
100 |
242 |
According to the results we can see, (Nginx supports the maximum number of connections =worker_processes*worker_connections, of course, I added the process count process, so accurate statistics to subtract)
The worker_processes of the Internet is better than the CPU number, which is not entirely applicable; When worker_processes=6, the result is uncertain;
On the contrary, surprisingly stable when worker_processes=2.
Nginx Support Connection Number problem