Welcome to Centmin Mod Community
Become a Member

PHP PHP 7.0.1 is available

Discussion in 'Nginx and PHP-FPM news & discussions' started by eva2000, Dec 18, 2015.

  1. eva2000

    eva2000 Administrator Staff Member

    54,110
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,739
    Local Time:
    4:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  2. eva2000

    eva2000 Administrator Staff Member

    54,110
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,739
    Local Time:
    4:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    First point release !

     
  3. eva2000

    eva2000 Administrator Staff Member

    54,110
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,739
    Local Time:
    4:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  4. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    7:49 AM
    1.9.9
    10.1.10
    Compiling on my CentOS 6.7 server as we speak, will post a follow up whether it works or not :)
     
  5. rdan

    rdan Well-Known Member

    5,443
    1,402
    113
    May 25, 2014
    Ratings:
    +2,194
    Local Time:
    2:49 PM
    Mainline
    10.2
    Done :D
    My 4GB Linode Server takes 8 minutes to recompile PHP 7.0.1 :/
    With 1,600+ current visitor as of XF and 300+ real time based on GA.
     
  6. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    7:49 AM
    1.9.9
    10.1.10
    Code:
    Starting php-fpm [17-Dec-2015 15:46:37] NOTICE: PHP message: PHP Warning:  Zend OPcache huge_code_pages: mmap(HUGETLB) failed: Cannot allocate memory (12) in Unknown on line 0
    
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,110
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,739
    Local Time:
    4:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    is that just a PHP 7.0.1 update and no changes to zendopcache.ini ? on centos 6.7 ?

    what output do you get for these cmds
    Code:
    cat /sys/kernel/mm/redhat_transparent_hugepage/enabled
    cat /etc/centminmod/php.d/zendopcache.ini
     
  8. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    7:49 AM
    1.9.9
    10.1.10
    Tried to enable huge_code_pages so set
    Code:
    opcache.huge_code_pages=1
    If I set it back to 0, everything works fine.

    Edit: yes CentOS 6.7.
     
  9. eva2000

    eva2000 Administrator Staff Member

    54,110
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,739
    Local Time:
    4:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what output do you get for these cmds
    Code:
    cat /sys/kernel/mm/redhat_transparent_hugepage/enabled
    cat /etc/centminmod/php.d/zendopcache.ini
     
  10. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    7:49 AM
    1.9.9
    10.1.10
    Code:
    [root@localhost php.d]# cat /sys/kernel/mm/redhat_transparent_hugepage/enabled
    [always] madvise never
    
    [root@localhost php.d]# cat /etc/centminmod/php.d/zendopcache.ini
    zend_extension=opcache.so
    ;opcache.error_log=/var/log/php_opcache_error.log
    opcache.enable=1
    opcache.memory_consumption=1024
    opcache.interned_strings_buffer=8
    opcache.max_wasted_percentage=5
    opcache.max_accelerated_files=16000
    ; http://php.net/manual/en/opcache.configuration.php#ini.opcache.revalidate-freq
    ; defaults to zend opcache checking every 180 seconds for PHP file changes
    ; set to zero to check every second if you are doing alot of frequent
    ; php file edits/developer work
    ; opcache.revalidate_freq=0
    opcache.revalidate_freq=360
    opcache.fast_shutdown=1
    opcache.enable_cli=0
    opcache.save_comments=1
    opcache.enable_file_override=1
    opcache.validate_timestamps=1
    opcache.huge_code_pages=1
    
     
  11. eva2000

    eva2000 Administrator Staff Member

    54,110
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,739
    Local Time:
    4:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    so it's enabled but still opcache.huge_code_pages=1 doesn't work, so probably still related to centos 6.x issues

    need someone with /sys/kernel/mm/redhat_transparent_hugepage/enabled set to always on CentOS 7. to try opcache.huge_code_pages=1 to confirm
     
  12. eva2000

    eva2000 Administrator Staff Member

    54,110
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,739
    Local Time:
    4:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    @Ahmad what's output for
    Code:
    cat /proc/meminfo
     
  13. rdan

    rdan Well-Known Member

    5,443
    1,402
    113
    May 25, 2014
    Ratings:
    +2,194
    Local Time:
    2:49 PM
    Mainline
    10.2
    Lesson learned, do not update PHP/Nginx/MariaDB during peak time :|.
     
  14. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    7:49 AM
    1.9.9
    10.1.10
    Code:
    [root@localhost php.d]# cat /proc/meminfo
    MemTotal:  8059148 kB
    MemFree:  3650240 kB
    Buffers:  159136 kB
    Cached:  3035180 kB
    SwapCached:  0 kB
    Active:  2187224 kB
    Inactive:  1875976 kB
    Active(anon):  876132 kB
    Inactive(anon):  39088 kB
    Active(file):  1311092 kB
    Inactive(file):  1836888 kB
    Unevictable:  0 kB
    Mlocked:  0 kB
    SwapTotal:  4194300 kB
    SwapFree:  4194300 kB
    Dirty:  44 kB
    Writeback:  0 kB
    AnonPages:  868904 kB
    Mapped:  39184 kB
    Shmem:  46340 kB
    Slab:  264628 kB
    SReclaimable:  235900 kB
    SUnreclaim:  28728 kB
    KernelStack:  3216 kB
    PageTables:  7240 kB
    NFS_Unstable:  0 kB
    Bounce:  0 kB
    WritebackTmp:  0 kB
    CommitLimit:  8223872 kB
    Committed_AS:  2721700 kB
    VmallocTotal:  34359738367 kB
    VmallocUsed:  32256 kB
    VmallocChunk:  34359612688 kB
    HardwareCorrupted:  0 kB
    AnonHugePages:  448512 kB
    HugePages_Total:  0
    HugePages_Free:  0
    HugePages_Rsvd:  0
    HugePages_Surp:  0
    Hugepagesize:  2048 kB
    DirectMap4k:  8180 kB
    DirectMap2M:  8380416 kB
    
     
  15. eva2000

    eva2000 Administrator Staff Member

    54,110
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,739
    Local Time:
    4:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yeah not ideal

    @Ahmad looks like centos 6.7 might not configure any hugepages itself even if enabled transparent huge page support
    Code:
    cat /proc/meminfo | grep -i HugePage
    AnonHugePages:    178176 kB
    HugePages_Total:       0
    HugePages_Free:        0
    HugePages_Rsvd:        0
    HugePages_Surp:        0
    Hugepagesize:       2048 kB
    as you have over 3GB of free memory you can afford to say assign 80 x 2048KB (Hugepagesize) = 160MB of memory to huge pages via adding to /etc/sysctl.conf the option vm.nr_hugepages=80 (DO NOT do this if you don't have enough free memory or adjust as needed for your memory availability)

    Code:
    echo "vm.nr_hugepages=80" >> /etc/sysctl.conf
    sysctl -p
    doublecheck
    Code:
    cat /proc/meminfo | grep -i HugePage
    AnonHugePages:    178176 kB
    HugePages_Total:      80
    HugePages_Free:       80
    HugePages_Rsvd:        0
    HugePages_Surp:        0
    Hugepagesize:       2048 kB
    Looks like it's same for my virtualbox CentOS 7.1 build nr_hugepages isn't configured even if there is transparent huge pages support
    Code:
    cat /proc/meminfo | grep -i HugePage
    AnonHugePages:     98304 kB
    HugePages_Total:       0
    HugePages_Free:        0
    HugePages_Rsvd:        0
    HugePages_Surp:        0
    Hugepagesize:       2048 kB
     
  16. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    7:49 AM
    1.9.9
    10.1.10
    That was it @eva2000 !
    Works fine now, being used aswell :)
     
  17. eva2000

    eva2000 Administrator Staff Member

    54,110
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,739
    Local Time:
    4:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    thanks for confirmation, guess i need to come up with a detection routine and formula to dynamically allocate nr_hugepages number based on detected amount of free memory available on both centos 6.x and 7.x :)
     
  18. rdan

    rdan Well-Known Member

    5,443
    1,402
    113
    May 25, 2014
    Ratings:
    +2,194
    Local Time:
    2:49 PM
    Mainline
    10.2
    But still not advisable for us using Redis?
     
  19. eva2000

    eva2000 Administrator Staff Member

    54,110
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,739
    Local Time:
    4:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yes if you use Redis transparent huge pages needs to be disabled
     
  20. rdan

    rdan Well-Known Member

    5,443
    1,402
    113
    May 25, 2014
    Ratings:
    +2,194
    Local Time:
    2:49 PM
    Mainline
    10.2
    Any explanations for me to read? :)