Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Piotr Karbowski jabberuser at gmail.com
Wed Jun 16 00:55:01 MSD 2010

On 15.06.2010 22:48, Rahul Bansal wrote:
> @jabberuser
>> I recommend have few more workers than number of cores. On one of my
>> overloaded dual core server I changed 2 worksers to 6, this reduced a
>> lot IOwait and fixed latency problem when using site which is on this
>> server. Play a bit with it to found best for you number of workers.
> Thanks for suggestions.
> I may go you way just in case fastcgi_cache in nginx improves my
> performance.
> In that case I will reduce value of PHP_FCGI_CHILDREN to offset it.

I have there 6 nginx workers and 10 php childrens, restarted after 100
request each

Php use ~22M of ram
 16.5 MiB +   5.4 MiB =  21.9 MiB	php-cgi (11)
And nginx ~5M
  2.9 MiB +   1.4 MiB =   4.4 MiB	nginx (7)
(base on ps_mem.py script).

nginx workers is one thing and php another. You host only php or also
static files?

-- Piotr.

More information about the nginx mailing list