Using multiple pools in PHP-FPM
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?
Solution 1:
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.