Welcome to Centmin Mod Community
Register Now

Forums upgraded to PHP 7

Discussion in 'Forum News' started by eva2000, Oct 14, 2016.

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

    eva2000 Administrator Staff Member

    54,564
    12,224
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,793
    Local Time:
    10:30 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Forums have finally been updated to PHP 7 from PHP 5.6.26. Currently, PHP 7.0.12 in use with extra performance boost in Centmin Mod 123.09beta01 branch by enabling Profile Guided Optimizations (PGO) for PHP 7 with training against both Wordpress, Drupal, MediaWiki like PHP code paths (provided by Intel) + Xenforo code paths (seems that didn't work) :)


    On CentOS 6.8 enabled:
    • Intel processor optimised PHP binary compilation & PHP extension compilation (GENERAL_DEVTOOLSETGCC)
    • + Profiled Guided Optimizations PGO (PHP_PGO)
    • + PHP_PGO_CENTOSSIX (use GCC 4.9.2 instead of GCC 4.4.7 with CentOS 6 so able auto detected for E5-2680v3 as Haswell based for Linode 8GB VPS. GCC 4.4.7 native compiler would of only detected processor under Core2 family instead of Haswell)
    via these persistent config file /etc/centminmod/custom_config.inc set options prior to running centmin.sh menu option 5 to update to PHP 7.0.12 pointing to my Xenforo index page for PGO training :)
    Code (Text):
    PHP_PGO='y'
    PHP_PGO_CENTOSSIX='y'
    #PHPPGO_INDEXPATH='/home/nginx/domains/mydomain.com/public/index.php'
    GENERAL_DEVTOOLSETGCC='y'


    Code (Text):
    php -v
    PHP 7.0.12 (cli) (built: Oct 14 2016 06:07:45) ( NTS )
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
        with Zend OPcache v7.0.12, Copyright (c) 1999-2016, by Zend Technologies
     
    Last edited: Oct 16, 2016
  2. eva2000

    eva2000 Administrator Staff Member

    54,564
    12,224
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,793
    Local Time:
    10:30 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Seems got errors on PGO training for xenforo index.php page during PHP upgrade compilation.

    Code (Text):
    An unexpected error occurred. Please try again later.Status: 500 Internal Server Error
    Content-Type: text/html; charset=utf-8
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-control: private, max-age=0, no-cache, must-revalidate
    Pragma: no-cache


    So folks can remove this entry from persistent config file /etc/centminmod/custom_config.inc if you are trying to train PHP 7 against Xenforo. Seems training works either on Wordpress index.php pages or Intel provided training profile scripts for Wordpress, Drupal, MediaWiki like PHP code paths
    Code (Text):
    PHPPGO_INDEXPATH='/home/nginx/domains/mydomain.com/public/index.php'
    
     
    Last edited: Oct 14, 2016
  3. eva2000

    eva2000 Administrator Staff Member

    54,564
    12,224
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,793
    Local Time:
    10:30 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  4. eva2000

    eva2000 Administrator Staff Member

    54,564
    12,224
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,793
    Local Time:
    10:30 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    By the numbers with webpagetest.org Los Angeles Cable 5mbps comparison test for PHP 7.0.12 + PGO vs PHP 5.6.26

    Love the slight but better speeds :)

    PHP 7 + PGO

    webpagetest-php7-summary.png

    PHP 5.6

    webpagetest-php56-summary.png

    Filmstrip and Video Comparison

    webpagetest-la-cable-php7-vs-php56-01.png

    webpagetest-la-cable-php7-vs-php56-02.png
    webpagetest-la-cable-php7-vs-php56-03.png
    webpagetest-la-cable-php7-vs-php56-04.png
    webpagetest-la-cable-php7-vs-php56-05.png
    webpagetest-la-cable-php7-vs-php56-07.png
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,564
    12,224
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,793
    Local Time:
    10:30 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    For folks curious about Xenforo debug page load times with PHP 7.0.12 + PGO enabled on my 8GB 4CPU Linode KVM VPS in Fremont, CA.
    • Forum Index = Timing: 0.0471 seconds Memory: 5.910 MB DB Queries: 12
    • Centmin Mod News forum = Timing: 0.0429 seconds Memory: 5.398 MB DB Queries: 10
    • PHP 7 PGO Thread = Timing: 0.0521 seconds Memory: 6.281 MB DB Queries: 18
    • Featured Thread Index = Timing: 0.0494 seconds Memory: 5.490 MB DB Queries: 8
    • Members List = Timing: 0.0446 seconds Memory: 5.137 MB DB Queries: 6
    • Media Index = Timing: 0.0341 seconds Memory: 4.726 MB DB Queries: 11
    • Resource Manager Index = Timing: 0.0331 seconds Memory: 4.822 MB DB Queries: 10
    • Search = Timing: 0.0306 seconds Memory: 4.782 MB DB Queries: 6
    • Help Page = Timing: 0.0233 seconds Memory: 4.436 MB DB Queries: 5
    ~55% faster than and ~45-50% less memory than when forums were on PHP 5.6 :cool: If was on dedicated server instead of VPS probably can shave another 40-50% off those times !
     
    Last edited: Oct 17, 2016
  6. eva2000

    eva2000 Administrator Staff Member

    54,564
    12,224
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,793
    Local Time:
    10:30 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Curious how forum is performing with more XF addons added (~98 addons total) in past 10 months with PHP 7.1.8 + PGO enabled on my 8GB 4CPU Linode KVM VPS in Fremont, CA.
    • Forum Index = Timing: 0.0559 seconds Memory: 6.834 MB DB Queries: 18
    • Centmin Mod News forum = Timing: 0.0533 seconds Memory: 6.302 MB DB Queries: 19
    • PHP 7 PGO Thread = Timing: 0.0598 seconds Memory: 7.427 MB DB Queries: 22
    • Featured Thread Index = Timing: 0.0474 seconds Memory: 7.017 MB DB Queries: 15
    • Members List = Timing: 0.0492 seconds Memory: 5.888 MB DB Queries: 12
    • Media Index = Timing: 0.0381 seconds Memory: 5.482 MB DB Queries: 17
    • Resource Manager Index = Timing: 0.0392 seconds Memory: 5.627 MB DB Queries: 16
    • Search = Timing: 0.0282 seconds Memory: 5.629 MB DB Queries: 11
    • Help Page = Timing: 0.0288 seconds Memory: 5.193 MB DB Queries: 11
    Looking forward to PHP 7.2 for more gains :)

    Forum index break down stats
    Code (Text):
    Page Time: 0.0591s
    Memory: 7.0418 MB (Peak: 7.3042 MB)
    Queries (18, time: 0.0071s, 12.1%)
    
     
    Last edited: Aug 22, 2017
Thread Status:
Not open for further replies.