How to set the number of php fpm processes: first open the "php-fpm.conf" configuration file; then modify the "pm.max_children" parameter; then set the "pm.start_servers" parameter; and finally set the maximum number of idle service processes Just count.
Recommended: "PHP Video Tutorial"
php-fpm process number setting
1.php-fpm has three management methods: static (the number of child processes is fixed), dynamic (the child process is dynamically set), and onedemand (the process is generated only when needed)
2.php-fpm The number of processes is mainly determined by the following five parameters
pm.max_children: When pm is static, it indicates the number of child processes created. When pm is dynamic, it indicates the maximum number of child processes that can be created.
pm.start_servers : Set the number of child processes created at startup, only valid when pm is dynamic.
Default value: min_spare_servers (max_spare_servers - min_spare_servers)/2
pm.min_spare_servers: Set the minimum number of idle service processes, only valid when dynamic.
pm.max_spare_servers: Set the maximum number of idle service processes, only valid when dynamic.
pm.process_idle_timeout: Number of seconds, how long it will take to end the idle process, only useful for onedemand
3.php-fpm process number setting is mainly determined by server memory. The php-fpm process occupies 20-30M of memory when running normally.
(1) If the system concurrency is not very large, it would be better to use static. The specific value is set according to the system request volume.
(2) If the system concurrency jitter is relatively large, it will be better to use dynamic. The specific value is set according to the system request concurrency and memory size.
The above is the detailed content of How to set the number of php fpm processes. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Atom editor mac version download
The most popular open source editor

Dreamweaver CS6
Visual web development tools
