48

PHP-FPM 调优:为了高性能使用 pm static

 5 years ago
source link: https://www.phpyc.com/php-fpm-tuning-using-pm-static-max-performance/?
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
让我们快速了解如何更好的设置 PHP-FPM,以实现高吞吐量和低延迟 默认情况下,大多数设置都将 PHP-FPM 的 PM(进程管理器)设置为 dynamic,并且如果遇到内存不足的问题,还需要使用 ondemand 让我们看一下 php.net 文档中的选项,并介绍我最喜欢的设置 - static: pm = dynamic: 子进程的数量根据以下配置动态设置 pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers pm = ondemand: 进程在请求时按需创建,而不是动态的,其中 pm.start_servers 进程数量在服务启动时创建 pm = static: 子进程的数量由

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK