what a worker does?
Paul
paul at gtcomm.net
Tue Jul 1 01:59:42 MSD 2008
I haven't tested it, I just like having a few extra processes, but we
get a ton of connections per second and a ton of stale connections so I
like to have as much 'socket space' as possible. It seems to spread the
connections somewhat evenly over the worker processes..
It probably won't matter much as long as you have 1 per cpu, but there
is some sort of connection limitation on each process imposed by the
kernel of the OS and if you run into that you will need more processes.
Mark Foster wrote:
> Paul wrote:
>> A worker is a process of nginx.. Each process is multithreaded and
>> can handle thousands of connections each.
>> You can have one worker and 50,000 connections to it, but it's good
>> to have at least as many workers as you have CPUs and I usually
>> multiply this times 4 (so 4 worker per CPU)..
>> Worker connections is how many connections each process (worker) can
>> have open at one time (max files open, sockets, etc)
>
> I would like to know if this really makes more sense that just using
> 1-to-1 workers to CPUs.
> Have you done any benchmark to determine the 4-to-1 ratio gives better
> performance?
> What is the "best practice?"
> Thanks.
>
More information about the nginx
mailing list