Discover Centmin Mod today
Register Now

PHP-FPM PHP JIT to make PHP run faster, increase performance

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by MaximilianKohler, May 17, 2024.

  1. MaximilianKohler

    MaximilianKohler Member

    202
    9
    18
    Jun 23, 2023
    Ratings:
    +36
    Local Time:
    4:44 PM
    I saw this thread Enable PHP JIT about JIT and I'm puzzled that this is the first I'm hearing about it given that CMM is all about squeezing out the best performance.

    I ran the command to check if it's enabled on my server and it's not. I found no other CMM threads with "PHP JIT" in the title.

    Is there a downside to JIT? This link says "JIT is implemented as part of Opcache". I do have OPcache. It also says JIT is a new feature added in PHP 8.0.


    This guy did some JIT benchmarks: PHP 8: How to setup the JIT - stitcher.io


    Please fill in any relevant information that applies to you:
    • CentOS Version: i.e. CentOS 7 64bit
    • Centmin Mod Version Installed: i.e. beta
    • Nginx Version Installed: 1.25.3
    • PHP Version Installed: 8.1.25
     
  2. eva2000

    eva2000 Administrator Staff Member

    55,425
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,840
    Local Time:
    9:44 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    See my reply at Who has enabled PHP JIT? Have you seen benefits with XenForo code or others code bases like Wordpress?

    Centmin Mod PHP-FPM built with optional PGO enabled can boost PHP performance one major version so PHP 8.0 with PGO gets PHP 8.1 level performance, PHP 8.2 with PGO will have PHP 8.3 level performance and so on :)

    So even Centmin Mod PHP 7.4 with PGO enabled (and without JIT enabled) already achieves REMI PHP 8.0 performance levels. Below chart shows Centmin Mod PHP 8.0 with only PGO enabled or even without PGO was as fast as REMI PHP 8.0 with JIT enabled. So it's not what you use but how you use it that matters ;)

    Not many folks test it enough to know hence why Centmin Mod does not enable it by default. Better off enabling Centmin Mod PHP-FPM Profile Guided Optimization (PGO) and get same performance as non Centmin Mod PHP with JIT enabled https://community.centminmod.com/threads/php-8-0-0-ga-stable-release.20739/#post-87299

    upload_2024-5-18_2-45-56.png
     
  3. MaximilianKohler

    MaximilianKohler Member

    202
    9
    18
    Jun 23, 2023
    Ratings:
    +36
    Local Time:
    4:44 PM