Welcome! Log In Create A New Profile

Advanced

Re: How nginx define a free worker?

Anton Yuzhaninov
November 21, 2012 12:38PM
On 11/21/12 20:51, Vivek Goel wrote:
> If I have n cores and I am running n nginx worker process how nginx will decide
> free worker for next connection?
>
> 1. Will it be doing round robin?
>
> If it is not using round robin what method it use? Is there a way I can force it
> to use round robin method?
> regards

Load distribution between worker processes affected by accept_mutex

http://nginx.org/r/accept_mutex

Default is to use accept mutex and if load is low, most request will be handled
by one worker.

On heavy loaded server load destribution between worker processes will be more
uniform.

You can switch off accept_mutex and load will be more uniform even with low
load, but all worker processes will be waken up on each new connection and only
one worker can accept given connection:
http://en.wikipedia.org/wiki/Thundering_herd_problem
In case of nginx number of processes is usually low, and negative impact of
accept_mutex off should be low.

--
Anton Yuzhaninov

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How nginx define a free worker?

goelvivek November 21, 2012 11:54AM

Re: How nginx define a free worker?

Anton Yuzhaninov November 21, 2012 12:38PM

Re: How nginx define a free worker?

goelvivek November 21, 2012 09:48PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 280
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready