33
PHP - PHP Benchmarks 7.4 vs 7.3 vs 7.2 vs 7.1 vs 7.0 (php-fpm) | Centmin Mod Com...
source link: https://community.centminmod.com/threads/php-benchmarks-7-4-vs-7-3-vs-7-2-vs-7-1-vs-7-0-php-fpm.18741/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
PHP PHP Benchmarks 7.4 vs 7.3 vs 7.2 vs 7.1 vs 7.0 (php-fpm)
Discussion in 'Nginx and PHP-FPM news & discussions' started by eva2000, Nov 28, 2019.
Thread Status:
Not open for further replies.
-
PHP 7.4.0 GA stable release was made on November 28, 2019. Below are PHP 7.4.0 vs 7.3.12 vs 7.2.25 vs 7.1.33 vs 7.0.33 PHP (php-fpm) benchmarks on latest updated Centmin Mod 123.09beta01 LEMP stack based dedicated server running CentOS 7.7 64bit. Just like I did for PHP 7.2 benchmarks and PHP 7.3 benchmarks. Reminder, if you find Centmin Mod LEMP stack useful, please support Centmin Mod in keeping the project alive, Ways you can support Centmin Mod.
Test System Info
System:- OVH MC-32 Intel Core i7 4790K
- 32GB Memory
- 2x240GB SSD
- 250Mbit Network Bandwidth
- CentOS 7.7 64bit
- Centmin Mod 123.09beta01 LEMP stack - Nginx 1.17.6, MariaDB 10.1.43 MySQL, + CSF Firewall
- BHS, Canada
Tests use following scripts- bench.php (official PHP file) - take the average of 3 runs
- micro_bench.php (official PHP file) - take the average of 3 runs
- detailed_benchmark.php - take the average of 3 runs
- Tested Remi YUM repo SCL based PHP versions versus Centmin Mod built PHP versions with and without Profile Guided Optimisations.
- PGO = Profile Guided Optimisations (for Wordpress, MediaWiki and Drupal like PHP web applications and similar PHP execution patterns.)
- Centmin Mod defaults to non-PGO PHP-FPM builds for PHP 7 by default. PGO built PHP might be faster for some specific PHP code but slower for others so choose PGO wisely.
- Latest tests are with Kernel updates for meltdown/spectre vulnerability patches which can reduce PHP performance compared to benchmarks done prior to November 28, 2019
- Linux Kernel 3.10.0-1062.4.3.el7.x86_64 was used
- The charts' bars are colour coded for PHP build type - Remi Yum vs Centmin Mod vs Centmin Mod + PGO.
- The charts' data labels are colour coded for PHP version tested for easier comparison between PHP build types.
PHP 7.4.0 Benchmarks Tables
Tabulated summary of results belowIf you're looking for PHP 5.6 benchmarks, I did those previously here.
Last edited: Nov 28, 2019 -
PHP 8.0 vs 7.4 vs 7.3 vs 7.2 vs 7.1 vs 7.0
Next PHP version after 7.4 will be PHP 8.0 which is in development. So was curious how PHP 8.0 dev master branch performed on Centmin Mod 123.09beta01 LEMP stack which was just updated to support PHP 8.0 dev master branch builds - including support for Profile Guided Optimizations. PHP 8.0.0 dev built definitely is faster in all tests. Though there was a slight regression for PHP 8.0.0 + PGO enabled bench.php test compared to PHP 8.0.0 non-PGO bench.php test but it was still faster than PHP 7.4.0 !Code (Text):php -v PHP 8.0.0-dev (cli) (built: Nov 30 2019 14:51:53) ( NTS ) Copyright (c) The PHP Group Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies with Zend OPcache v8.0.0-dev, Copyright (c), by Zend Technologies
Code (Text):php-config Usage: /usr/local/bin/php-config [OPTION] Options: --prefix [/usr/local] --includes [-I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib] --ldflags [ -L/usr/local/lib64] --libs [-lcrypt -lc-client -ltidy -largon2 -lresolv -lcrypt -lncurses -laspell -lpspell -lrt -lldap -llber -lstdc++ -lcrypt -lpam -lgmp -lbz2 -lrt -lm -ldl -lsystemd -lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lsqlite3 -lz -lcurl -lxml2 -lenchant -lgmodule-2.0 -lglib-2.0 -lffi -lssl -lcrypto -lz -lpng15 -lwebp -ljpeg -lXpm -lX11 -lfreetype -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -licuio -licui18n -licuuc -licudata -lonig -lsqlite3 -ledit -ltinfo -lxml2 -lnetsnmp -lssl -lssl -lcrypto -lm -lxml2 -lsodium -lcrypt -largon2 -lxml2 -lxml2 -lxml2 -lxml2 -lxslt -lm -lxml2 -lexslt -lxslt -lm -lgcrypt -ldl -lgpg-error -lxml2 -lzip -lssl -lcrypto -lcrypt ] --extension-dir [/usr/local/lib/php/extensions/no-debug-non-zts-20190128] --include-dir [/usr/local/include/php] --man-dir [/usr/local/php/man] --php-binary [/usr/local/bin/php] --php-sapis [ cli embed fpm phpdbg cgi] --ini-path [/usr/local/lib] --ini-dir [/etc/centminmod/php.d] --configure-options [--enable-fpm --enable-opcache --enable-intl --enable-pcntl --with-mcrypt --with-snmp --enable-embed=shared --with-mhash --with-zlib --with-gettext --enable-exif --with-zip --with-libzip --with-bz2 --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-mysql-sock=/var/lib/mysql/mysql.sock --with-curl --enable-gd --with-xmlrpc --enable-bcmath --enable-calendar --enable-ftp --enable-gd-native-ttf --with-freetype --with-jpeg --with-png-dir=/usr --with-xpm --with-webp --with-t1lib=/usr --enable-shmop --with-pear --enable-mbstring --with-openssl --with-mysql=mysqlnd --with-libdir=lib64 --with-mysqli=mysqlnd --enable-pdo --with-pdo-sqlite --with-pdo-mysql=mysqlnd --enable-inline-optimization --with-imap --with-imap-ssl --with-kerberos --with-readline --with-libedit --with-gmp --with-pspell --with-tidy --with-enchant --with-fpm-user=nginx --with-fpm-group=nginx --with-ldap --with-ldap-sasl --with-password-argon2=/usr/local --with-sodium=/usr/local --with-config-file-scan-dir=/etc/centminmod/php.d --with-fpm-systemd --with-ffi --with-xsl LIBSODIUM_CFLAGS=-I/usr/local/include LIBSODIUM_LIBS=-L/usr/local/lib64 -lsodium LIBZIP_CFLAGS=-I/usr/local/include LIBZIP_LIBS=-L/usr/local/lib64 -lzip] --version [8.0.0-dev] --vernum [80000]
- O - Optimization level
- 0 - don't JIT
- 1 - minimal JIT (call standard VM handlers)
- 2 - selective VM handler inlining
- 3 - optimized JIT based on static type inference of individual function
- 4 - optimized JIT based on static type inference and call tree
- 5 - optimized JIT based on static type inference and inner procedure analyses
- T - JIT trigger
- 0 - JIT all functions on first script load
- 1 - JIT function on first execution
- 2 - Profile on first request and compile hot functions on second request
- 3 - Profile on the fly and compile hot functions
- 4 - Compile functions with @jit tag in doc-comments
- R - register allocation
- 0 - don't perform register allocation
- 1 - use local liner-scan register allocator
- 2 - use global liner-scan register allocator
- C - CPU specific optimization flags
- 0 - none
- 1 - enable AVX instruction generation
For example for detailed_benchmark.php reading the 1st row of results for PHP 8.0.0 dev JIT Centmin Mod PHP-FPM with PGO enabled has a time of 1.2377 seconds which is:- 32.3% faster than Centmin Mod PHP 7.3.12
- 23.5% faster than Centmin Mod PHP 7.4.0
- 20.4% faster than Centmin Mod PHP 8.0
- 13.5% faster than Centmin Mod PHP 8.0 JIT
- 20.3% faster than Centmin Mod PHP 7.3.12 + PGO
- 12.9% faster than Centmin Mod PHP 7.4.0 + PGO
- 9.5% faster than Centmin Mod PHP 8.0 + PGO
- 0% faster = even than Centmin Mod PHP 8.0 JIT + PGO
- 0.1% faster than Centmin Mod PHP 7.3.12
- 12.9% slower than Centmin Mod PHP 7.4.0
- 27.7% slower than Centmin Mod PHP 8.0
- 32.8% slower than Centmin Mod PHP 8.0 JIT
- 17.7% slower than Centmin Mod PHP 7.3.12 + PGO
- 28.5% slower than Centmin Mod PHP 7.4.0 + PGO
- 33.5% slower than Centmin Mod PHP 8.0 + PGO
- 47.6% slower than Centmin Mod PHP 8.0 JIT + PGO
Last edited: Dec 2, 2019 - O - Optimization level
Thread Status:
Not open for further replies.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK