Please help us to see if the following configuration is reasonable? {Code ...} I always thought that max_spare_servers is the maximum number of idle php Processes specified. On one machine, I ran several docker instances running the php environment. If the idle instances also kept 40 idle processes, will it cause... please help us to see if the following configuration is reasonable?
pm = dynamicpm.max_children = 40pm.start_servers = 5pm.min_spare_servers = 5pm.max_spare_servers = 40 pm.max_requests = 5000
I always thought that max_spare_servers is the maximum number of idle php Processes specified. On one machine, I ran several docker instances running the php environment. If the idle instances also kept 40 idle processes, will this cause unbalanced resource utilization or insufficient resources of other busy instances?
Reply content:
Please help us to see if the following configuration is reasonable?
pm = dynamicpm.max_children = 40pm.start_servers = 5pm.min_spare_servers = 5pm.max_spare_servers = 40 pm.max_requests = 5000
I always thought that max_spare_servers is the maximum number of idle php Processes specified. On one machine, I ran several docker instances running the php environment. If the idle instances also kept 40 idle processes, will this cause unbalanced resource utilization or insufficient resources of other busy instances?
Yes! Idle processes not only occupy the memory, but also occupy the memory not released in the last request. If the maximum idle amount is too large, it is easy to see that the memory is too high and does not fall back for a long time (which can be seen through monitoring ).
We recommend that you do not need to open too much at the maximum idle time. In addition, pm. max_requests can effectively reduce the situation mentioned above. 5000 is more suitable.
Idle processes do not occupy the CPU and only occupy a certain amount of memory.