Recently inherited a Nginx+PHP5-FPM server, and I'm learning and trying to optimize PHP5-FPM settings.
4 CPUs (8 threads) 7.5 GiB RAM
pm.max_children = 5 pm.min_spare_servers = 1 pm.max_spare_servers = 3 ;pm.process_idle_time = 10s; ;pm.max_requests = 500
(I'm going to uncomment the max_requests line, since that appears to be a recommended thing to do.)
When the website is under load, each PHP5-FPM process has very high CPU usage but I have yet to see a process go over 1% RAM usage.
In my case, would increasing
pm.max_children increase or decrease my website's performance, based on the fact that it is more CPU bound than RAM bound? In other words, as
pm.max_children increases is RAM the only consideration or is CPU also affected?
[Edit] Not a duplicate: The question basically boils down to the final sentence, which is not asking for advice about capacity planning; it is asking if CPU usage is a consideration in the pm.max_children setting or if it is solely RAM that is increased.