Optimizing worker_processes, worker_connections & PHP_FCGI_CHILDREN - Any Good Tutorial?

Reinis Rozitis r at roze.lv
Tue Jun 15 21:57:52 MSD 2010

> [*] Is it good to make [i]PHP_FCGI_CHILDREN = 1[/i] if I am using APC
> for PHP opcode caching?

One child won't do anything good on a multicore box (giving the usuall 
nature of php scripts - waiting on external resources like DBs etc). Nor it 
can saturate single cpu (also APC doesnt limit you here in any way).

I would suggest to give it a try to the new FPM sapi/manager which is now 
included also in 5.3.x core.
It gives you the ability to dynamically manage a pool of php processes 
(spawn more php childs if the server gets loaded or kill the unneeded 
spares). That way you dont need to control any settings from the webservers 



More information about the nginx mailing list