Join the community today
Register Now

Feedback PHP PGO is discontinued

Discussion in 'AlmaLinux 8 & Rocky Linux 8 Beta Testing' started by buik, Sep 25, 2022.

Tags:
  1. buik

    buik “The best traveler is one without a camera.”

    1,966
    513
    113
    Apr 29, 2016
    Flanders
    Ratings:
    +1,634
    Local Time:
    5:43 AM
    PHP PGO is discontinued as written below.

    Because PHP can change code. Even from current releases.
    In the case of bug and security updates.
    It is the question whether it is still smart to use PGO. Few options that may be recommended.

    - Completely stop using the PHP PGO option in CMM 8 and newer. As deprecated functionality.
    - Not releasing PHP PGO at upcoming releases like PHP 8.2.
    - Show a banner notification that the code is discontinued by Intel and at own risk.
    - ...... I'm sure another reason can be thought of

     
  2. eva2000

    eva2000 Administrator Staff Member

    52,172
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    1:43 PM
    Nginx 1.25.x
    MariaDB 10.x
    I ran into this with @rdan but fixed at https://community.centminmod.com/th...ript-update-in-123-09beta01.20979/#post-94234

    Intel PGO training isn't the same as PGO itself. As I understand Intel only discontinuing the development of the PGO training scripts not that PGO is discontinued. PGO is native feature to GCC compilers and the like https://en.wikipedia.org/wiki/Profile-guided_optimization and not Intel specific and works without Intel PGO training scripts. Just Intel PGO training makes it easier to train PHP code paths. Intel does however have a nice explanation of PGO https://www.intel.com/content/www/u...gramming/profile-guided-optimization-pgo.html :)

    Folks at Rust also have a nice guide Profile-guided Optimization - The rustc book as does Android folks Using Profile-Guided Optimization (PGO)  |  Android Open Source Project

    Centmin Mod PHP PGO doesn't only use Intel PGO training scripts, other scripts add to the PGO training and Centmin Mod also supports supplying PHP script paths to add your own PGO training as well https://community.centminmod.com/threads/update-inc-php_upgrade-inc-add-phppgo_indexpath-variable-support-in-1….8972/

    In theory if we have some smart PHP programmers, they can whip up PGO training scripts for specific web app/frameworks too that we can use. Any takers ? :)
     
    Last edited: Sep 25, 2022
  3. buik

    buik “The best traveler is one without a camera.”

    1,966
    513
    113
    Apr 29, 2016
    Flanders
    Ratings:
    +1,634
    Local Time:
    5:43 AM
    This brings a different light to the project. Since this is a beta and you are asking for feedback.
    I am asking it in a different way. Since you forked the PGO scripts and PHP 8.1 does not work out of the box (patch code is needed).

    So you need to patch the code time over time after updates.
    Which apparently the official PHP 8.1 maintainer has no need for?
    And so again it takes extra you time to manage it. Is this time/result worth it?

    CMM8 has been a very long time coming. With good reasons, of course. It seems to me to remove unnecessary ballast from CMM. So that any upgrade to EL9, El10 etc in the future. will take less time and you can use your precious time more efficiently.
     
    Last edited: Sep 25, 2022
  4. eva2000

    eva2000 Administrator Staff Member

    52,172
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    1:43 PM
    Nginx 1.25.x
    MariaDB 10.x
    For the PHP PGO performance gains between 5-50% depending on PHP app, yes worth my time for now at least :) The latest PHP 8.1 patch I borrowed from another forked Intel PGO training repo maintained by one of the core PHP developers/PECL maintainers cmb69 cmb69 - Overview. So wasn't too tricky :D

    PHP PGO isn't that much to maintain, even if Intel PGO training scripts were removed, PHP PGO will still work just the performance boost may not be as great unless you add your own specific training. IIRC, specifically supply Wordpress index page to Centmin Mod PHP PGO training path option https://community.centminmod.com/threads/update-inc-php_upgrade-inc-add-phppgo_indexpath-variable-support-in-1….8972/ produced better performance than Intel PGO training scripts alone :)
     
  5. eva2000

    eva2000 Administrator Staff Member

    52,172
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    1:43 PM
    Nginx 1.25.x
    MariaDB 10.x
    FYI, I've also been working on making Nginx PGO compile supported too for extra performance. But so far have not been too successful - so have put it aside for now :D
     
  6. buik

    buik “The best traveler is one without a camera.”

    1,966
    513
    113
    Apr 29, 2016
    Flanders
    Ratings:
    +1,634
    Local Time:
    5:43 AM
    I also don't think Nginx is going to support this anytime soon. It takes programmer hours. While the easiest option 'for extra performance', is very easy. Just add fast extra hardware :)
     
  7. eva2000

    eva2000 Administrator Staff Member

    52,172
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    1:43 PM
    Nginx 1.25.x
    MariaDB 10.x
    Yeah, can always hope heh. But there's also a newer PGO-like method for Automatic Feedback Directed Optimization - AutoFDO which Intel has moved onto and uses extensively in their Intel ClearLinux OS https://gcc.gnu.org/wiki/AutoFDO/Tutorial. That is probably why Intel is discontinuing their PGO training scripts in favour of AutoFDO as it moves away from needing static instrumentation and training. Thus wouldn't need any direct support from Nginx themselves I don't think.

    PGO is the traditional FDO method
    Move to AutoFDO
    AutoFDO Optimizations For The GCC Compiler - Phoronix
    Google also using AutoFDO in combination with PGO Google Using AutoFDO On Linux Meant Up To 12% Less Cycles Spent Within The Kernel - Phoronix
     
  8. buik

    buik “The best traveler is one without a camera.”

    1,966
    513
    113
    Apr 29, 2016
    Flanders
    Ratings:
    +1,634
    Local Time:
    5:43 AM
    With other words you are testing c.q. use AutoFDO to?
     
  9. eva2000

    eva2000 Administrator Staff Member

    52,172
    11,998
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,501
    Local Time:
    1:43 PM
    Nginx 1.25.x
    MariaDB 10.x
    c.q. ? Not actively testing AutoFDO right now only dabbled with it. Nothing planned for at least EL8 and EL9 compatibility testing phase right now.