Hi all,
I just upgrade nginx to 1.9.2 and also enabled reuseport for my website.
But I found that all workloads are handled by the same worker. Even though this worker is pretty busy and almost 100% CPU usage. And if I remove reuseport and use accept_mutex , all my workers are working and each of them get about 10%-15% CPU usage.
Based on nginx document, it supposed to balance the work load on different workers.
With the SO_REUSEPORT option enabled, there are multiple socket listeners for each IP address and port combination, one for each worker process. The kernel determines which available socket listener (and by implication, which worker) gets the connection.
https://www.nginx.com/blog/socket-sharding-nginx-release-1-9-1/
And I check FB document it's said that freebsd is supporting SO_REUSEPORT.
So is this a bug or I need to enable SO_REUSEPORT for freebsd?
Thanks
I just upgrade nginx to 1.9.2 and also enabled reuseport for my website.
Code:
worker_processes 18;
...
listen 80 accept_filter=httpready reuseport;
But I found that all workloads are handled by the same worker. Even though this worker is pretty busy and almost 100% CPU usage. And if I remove reuseport and use accept_mutex , all my workers are working and each of them get about 10%-15% CPU usage.
Based on nginx document, it supposed to balance the work load on different workers.
With the SO_REUSEPORT option enabled, there are multiple socket listeners for each IP address and port combination, one for each worker process. The kernel determines which available socket listener (and by implication, which worker) gets the connection.
https://www.nginx.com/blog/socket-sharding-nginx-release-1-9-1/
And I check FB document it's said that freebsd is supporting SO_REUSEPORT.
So is this a bug or I need to enable SO_REUSEPORT for freebsd?
Thanks