I'm trying to tune my php-fpm installation for my server, and I have trouble figuring out what to do with the pm.start_servers
, pm.min_spare_servers
and pm.max_spare_servers
variables. I am using pm = dynamic
pm.max_children
is perfectly clear. Each child process serves 1 web client at one time. Ok. What is a "server", then? Clearly, based on the default configuration I have, 1 server can serve more than 1 child. What is the upper limit? What should I use as rule of thumb for # of children / server? Or is it related at all? On some forum, someone was claiming that # of servers should be 2 x # of cpu cores, but I have seen recommended configurations where the number was much higher, 40-50.
Neither the PHP documentation nor the many "tuning php-fpm" articles out there have been at all helpful.