大网数据广告活动
服务器运维问答

Using multiple pools in PHP-FPM

· 52CE 我爱测

When reading the article on the link below, I had some doubts, I will explain my scenario and talk about my doubt. https://dzone.com/articles/upstream-php-fpm-for-better-performance-1 I currently have a 32 GB memory server, of wh…

问题原文

原帖链接 · Lucas Lima · CC BY-SA 4.0

When reading the article on the link below, I had some doubts, I will explain my scenario and talk about my doubt.

https://dzone.com/articles/upstream-php-fpm-for-better-performance-1

I currently have a 32 GB memory server, of which I left 20 GB for PHP-FPM. I have a www.conf file, and I am using the "ondemand" method, the average consumption of my PHP-FPM pools is 29 MB, so my pm.max_children is equal to 690, my pm.process_idle_timeout is 15s, and my pm.max_requests is equal to 1000.

Is it worth it to create another www2.conf, calculate 10 GB of memory for each one, and do the "load balance" of the requests that are entering using the upstream of nginx? Can this increase the performance and redundancy of my sites?

已采纳解答

原帖链接 · Tero Kilkanen · CC BY-SA 4.0

The linked article is from year 2016 and seems to be referring to PHP5.

PHP has taken big steps forward since that and most likely the article is invalid for current PHP versions.

I personally doubt that any such tuning would be beneficial.

However, I don't have any real-world experience on such a setup. I recommend you to test both setups with your workload and see if there is any benefit.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-01-23)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。