Worker processes

Jason Lee lists at ruby-forum.com
Wed May 7 19:05:32 MSD 2008


Igor Sysoev wrote:
> On Tue, May 06, 2008 at 11:10:59PM -0700, kingler wrote:
> 
>> If you have multiple CPUs, you can also try setting the number of
>> worker processes to the same number of CPU cores.
> 
> It make sense only if nginx eats many CPU time for gzipping or SSL.
> Otherwise OS may schedule all workers on single CPU.

So real quick I have to say, after using all the 'big' http servers, 
Nginx is my favorite. Not just for the speed, but the configuration is 
so much easier, so thanks! This is my default HTTP server now. :)

I'm running my production server on 2 x 4-core Xeons. I have my conf 
setup with SSL, gzip. When hitting the server, the load is minimal.

I heard in this thread that 1 worker is enough. But if I needed more, 
then I'd be more than happy to do that. I did play around with the 
settings and when I cranked up the worker_processes to 10, it seemed 
like my pages took a little bit more time - there was a lot of browser 
activity it was showing me at the bottom of my window. However, when I 
dropped the worker process down to 2 (where it's at now), everything 
seemed snappier.

So is the worker process the one thread thread that listens on port 80? 
Or is it a multithreaded process that listens and then uses the worker 
connects (which are threads?) to listen to incoming requests? Or am I 
completely wrong all together.

Thanks for everyone's replies!

- jason
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list