Want more timely Centmin Mod News Updates?
Become a Member

PHP-FPM PHP PGO - Profile Guided Optimizations

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by idnoo, Jun 3, 2019.

  1. idnoo

    idnoo New Member

    3
    1
    3
    Jun 3, 2019
    Ratings:
    +1
    Local Time:
    12:33 AM
    1.17
    10.3
    So I've been reading the threads about how to setup PHP PGO with centminmod and it sounds simple enough thanks to eva doing all the hard work. However, I don't understand exactly what PGO is or if it will benefit me in my situation. I've done some reading and sort of get the general concept. It recompiles php to increase performance for certain things.. such as WordPress. You can train it for different applications and specify your path to index.php.

    I just had a few questions about it so I can figure out if it's something I should use for myself or not.

    -Will this work with PHP frameworks such as Laravel / Phalcon / Code Igniter / etc ?

    I'm mostly just confused because there are many mentions of WordPress and other CMS and their performance gains but nothing about frameworks. Also there was a post where eva mentioned that you don't need to specify the index.php for WordPress because PGO was optimized for for it regardless. So that confuses me as to what PGO works with.. or benefits.. Can it be trained to benefit anything or only certain things?

    -If it does work for these frameworks then should I specify the index.php or not specfiy it?


    I ask this because I read that it can mess up the compile when using certain things?

    -Lastly.. is it possible that using PGO can actually have any negative impacts on performance? or that it can cause any hidden adverse effects of any kind? Is it better not to use it unless I'm using WordPress or something better supported?

    I'd appreciate any info on this.. I'm pretty clueless about it.
     
  2. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:33 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    As outlined in links to PHP PGO in How to boost performance guide, depends on php code paths used by those frame works if they utilise the existing PGO pre-training php code paths, if they do not use those code paths, then yes you may need to specifying the framework's index.php and other php urls and see if that works.

    Only way to know if it works is to benchmark before and after

    it shouldn't mess up php compile with default PGO enabling and no specified index.php paths, if you specify an index.php path and it doesn't allow PHP to compile, just remove the specified index.php and recompile PHP
     
  3. idnoo

    idnoo New Member

    3
    1
    3
    Jun 3, 2019
    Ratings:
    +1
    Local Time:
    12:33 AM
    1.17
    10.3
    Okay thanks! I figured I would have to wait until I can benchmark to find out. Maybe after the part for my server arrives and I decide which framework I'm going to use.. If I do get around to testing then I can update on if it makes any difference or not if anyone's interested.
     
    Last edited: Jun 3, 2019