Join the community today
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

    28,925
    6,566
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,744
    Local Time:
    9:31 AM
    Nginx 1.13.x
    MariaDB 5.5
    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
    • Like Like x 3
  2. eva2000

    eva2000 Administrator Staff Member

    28,925
    6,566
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,744
    Local Time:
    9:31 AM
    Nginx 1.13.x
    MariaDB 5.5
    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
    • Like Like x 1
  3. eva2000

    eva2000 Administrator Staff Member

    28,925
    6,566
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,744
    Local Time:
    9:31 AM
    Nginx 1.13.x
    MariaDB 5.5
  4. eva2000

    eva2000 Administrator Staff Member

    28,925
    6,566
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,744
    Local Time:
    9:31 AM
    Nginx 1.13.x
    MariaDB 5.5
    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
     
    • Winner Winner x 1
  5. eva2000

    eva2000 Administrator Staff Member

    28,925
    6,566
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,744
    Local Time:
    9:31 AM
    Nginx 1.13.x
    MariaDB 5.5
    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
    • Like Like x 1
    • Winner Winner x 1
Thread Status:
Not open for further replies.