0

I saw this article how to tune the PHP FPM

https://medium.com/@sbuckpesch/apache2-and-php-fpm-performance-optimization-step-by-step-guide-1bfecf161534

this article shows Excel sheet to calculate best php poold. conf values calculated to the server's hardware.

Until now I used one .conf pool.d file for each web site, how to use now the tuned values? I think write them in every pool.d .conf is bad, so should I now join all web sites into one poold. conf file? I did the separate confs mainly to give each site own php settings for security (open_basedir).

thanks

0

If these "tuned" values are calculated based on the maximum capacity of your server and you put the same values to every site, you'll consume your resources multiple times. Instead, these values should be distributed between the pools so that the sum from all pools is equivalent with the "tuned" value. And this is if the calculations from Sebastian Buckpesch are reasonable.

Not every site needs the same amount of resources. You should know which of your sites gets more visitors or have more heavy scripts etc. etc. and allocate the resources accordingly. If you run out of resources, you need to allocate less, replace the hardware or whatever is needed to solve the issue. If a single site runs slow and you can move some resources from another site, do that. It's not as simple as in the article and there's no comprehensive Excel sheet that can tell you the truth.

Whatever you do, keep your sites in separate pools with separate user accounts. Otherwise a compromise on a single site can spread across all your sites.

  • Thank You for your time Esa. Is possible use one www.conf for all sites and then give each site own open_basedir value exactly for security you mentioned? I mean except using php.user.ini as I want have disabled this option for security. Can I use php values in apache's site .conf file or that won't work when PHP-FPM is used? thanks. and if you be so kind to edit your answer with this question, I really think it will help many people. – Roman_G Feb 7 at 11:23
  • It's not serving static content. The scripts have the permissions of the user. You can limit filesystem access with open_basedir, but it doesn't limit other things the user can do. – Esa Jokinen Feb 8 at 3:56

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.