Join the community today
Register Now

Featured Added Profile Guided Optimizations To Boost PHP 7 Performance

Discussion in 'Centmin Mod News' started by eva2000, Oct 1, 2016.

Thread Status:
Not open for further replies.
  1. eva2000

    eva2000 Administrator Staff Member

    30,613
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,304
    Local Time:
    8:54 PM
    Nginx 1.13.x
    MariaDB 5.5

    Added Profile Guided Optimizations To Boost PHP 7 Performance



    Updated latest Centmin Mod 123.09beta01 with optional support for Profile Guided Optimized PHP 7 only builds which boost PHP performance by between 3-17% for Wordpress, MediaWiki and Drupal like PHP web applications and similar PHP execution patterns. However, due to PGO requiring to compile PHP twice, it will take longer to compile PHP 7. Details outlined here and on Intel's blog here.

    When you recompile/compile PHP 7 via centmin.sh menu option 5 with PHP_PGO='y' set in persistent config file /etc/centminmod/custom_config.inc, the ending text for PHP 7 compile will read.
    Code (Text):
    ***************************************************
    * PHP upgraded and auto reinstalled PHP extensions
    * PHP_PGO='y' detected. PHP compiled with Profile Guided Optimizations
    * https://software.intel.com/en-us/blogs/2015/10/09/pgo-let-it-go-php
    ***************************************************


    The php log would also display at make stage the following
    Code (Text):
                   ____   _   _  ____       __  __         _       
                  |  _ \ | | | ||  _ \  _  |  \/  |  __ _ | | __ ___
                  | |_) || |_| || |_) |(_) | |\/| | / _` || |/ // _ \
                  |  __/ |  _  ||  __/  _  | |  | || (_| ||   <|  __/
                  |_|    |_| |_||_|    (_) |_|  |_| \__,_||_|\_\\___|
                                                                    
    make -j11 prof-gen
    CCACHE_DISABLE=1 make PROF_FLAGS=-fprofile-generate all
    


    PGO PHP 7 training phase for Wordpress, MediaWiki and Drupal like PHP usage loads will auto generate a MySQL database called pgo_train for this training and will have repeated output similar to below during PHP 7 compilation with PHP_PGO='y' set.
    Code (Text):
    
                    -=- init Database(s) -=-
    Database pgo_train succesfully dropped
    Database pgo_train created succesfully
    Created tables in pgo_train
    
                    -=- Existing Databases -=-
    information_schema
    mysql
    performance_schema
    pgo_train
    Content-type: text/html; charset=UTF-8
    
    Hash benchmark module loaded!
    MySQL benchmark module loaded!
    Date benchmark module loaded!
    String benchmark module loaded!
    Standard benchmark module loaded!
    Class benchmark module loaded!
    
    --------------------------------
    -   Benchmark timing results   -
    --------------------------------
    1.run_hash                 0.055
    2.run_hash                 0.055
    3.run_hash                 0.055
    4.run_hash                 0.055
    --------------------------------
    1.run_mysql_queries        0.020
    2.run_mysql_queries        0.018
    3.run_mysql_queries        0.019
    4.run_mysql_queries        0.018
    --------------------------------
    1.run_time                 0.002
    2.run_time                 0.002
    3.run_time                 0.002
    4.run_time                 0.002
    --------------------------------
    1.run_string               0.012
    2.run_string               0.012
    3.run_string               0.012
    4.run_string               0.012
    --------------------------------
    1.run_standard             0.016
    2.run_standard             0.016
    3.run_standard             0.016
    4.run_standard             0.016
    --------------------------------
    1.run_class                0.001
    2.run_class                0.001
    3.run_class                0.001
    4.run_class                0.001
    --------------------------------
    Total                      0.418
    

     
    Last edited: Oct 1, 2016
    • Like Like x 3
    • Winner Winner x 2
    • Informative Informative x 2
  2. eva2000

    eva2000 Administrator Staff Member

    30,613
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,304
    Local Time:
    8:54 PM
    Nginx 1.13.x
    MariaDB 5.5
Thread Status:
Not open for further replies.