Optimize Apache and PHP-FM

Discussion in 'ISPConfig 3 Priority Support' started by MaxT, Apr 30, 2020.

  1. MaxT

    MaxT Active Member HowtoForge Supporter

    Hi,

    I want to optimize one php-fm website because its visits are growing. I have two doubts:

    1 - Is there some place inside ISPC to configure php-fm for one website?

    2 - I'm confused about the right approach for the optimization. I have installed apache2buddy to have a general advice and I have some guides and etc. However, this website runs php-fm, and my doubt is about the right course to follow:

    Should I optimize apache configuration, and later optimize the php-fm?. Or should I ignore one or another?
    Is there some relation between both to get a right optimization?

    Strangely I cannot find in internet any optimization guide explaining the relation between both configurations to optimize websites.
    Do you know some guide or have some experience or advice?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    In my opinion, you can't really optimize PHP-FPM, all you should do is adjusting the settings on the options tab so that the PHP-FPM child server instances match the simultaneous requests that you expect for that site or maybe use onDemand mode and just set a max number of instances. Besides that, ensure that you have a php opcache installed (should be the default today anyway) and that you use the most recent PHP version that the cms in that site supports. You can have additional PHP versions in ISPConfig, so if that site supports e.g. PHP 7.4, then install PHP 7.4 as additional PHP version and choose it in the site settings for this website.

    And for apache, try out what that tool or the guides suggest and see if it gets faster or slower :)
     
    MaxT likes this.
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe one general note on PHP modules, you might have php modules installed in php-fpm that no site actually uses, if that's the case, remove these modules as leaner is always better, less RAM usage and therefore faster :)
     
    MaxT likes this.
  4. MaxT

    MaxT Active Member HowtoForge Supporter

    ok, I understand... Then after the Apache general optimization I should adjust the php-fm child instances to catch the expected requests.
    I will do.
    Good idea disabling useless php modules to accelerate the performance. It was not in my mind. And I have asked my self many times about the utility of some of these modules without thinking in these RAM benefits... Maybe they exist to be disabled:D

    Thanks for the help!
     

Share This Page