Is the number of pm. maxchildren of php-fpm directly related to concurrency? Thank you for your direct connection between the number of pm. max children and concurrency capabilities of php-fpm? Thank you!
Reply: Is there a direct connection between the number of pm. max children and the concurrency of php-fpm? Thank you!
Short answer:
Pm. max_children = maximum concurrency
Detailed answer:
Pm. max_children indicates the maximum number of sub-processes that php-fpm can start. Because php-fpm is a multi-process single-thread synchronization mode, that is, a sub-process can process at most one request at the same time, so the number of sub-processes is equal to the maximum number of concurrent processes.
The number of processes is generally limited by the same memory as nginx. it is the most reasonable to calculate this value based on the memory. when the number of processes reaches a certain level, it may have to test other hardware configurations, such as I/O! So the answer is, there must be an impact.
Yes, I have seen it before when I checked the Nginx high concurrency configuration.