Home Backend Development PHP Problem How to set the number of php fpm processes

How to set the number of php fpm processes

Aug 10, 2020 am 10:06 AM

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.

How to set the number of php fpm processes

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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1673
14
PHP Tutorial
1277
29
C# Tutorial
1257
24