Re: HYBRID VM
| From: | lists@rhsoft.net | Date: | Mon, 15 May 2017 18:01:40 +0000 |
| Subject: | Re: HYBRID VM | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-99053@lists.php.net to get a copy of this message | ||
Am 15.05.2017 um 16:43 schrieb Dmitry Stogov:
Hi, Recently, I committed HYBRID VM into master, but didn't enable it by default yet. It provides significant performance improvement on small benchmarks (1.5 times faster on bench.php) and slight improvement on real-life apps (1-2% on wordpress). Currently it improves PHP only on x86, x86_64 and PPC compiled with GCC. Anyone may regenerate and test it. php zend_vm_gen.php --with-vm-kind=HYBRID makebenchmarks for our inhouse CMS on my home-machine * Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz * PGO-Build -mtune=sandybridge for our application there is real difference, just look at the two different runs with the hybrid-vm - which is at least not bad at the end "corecms" = a completly stripped own instance of our inhouse cms "contentlounge" = a expensive "generic formmailer" and other modules on the page the machine runs in a room with a high temperature and i faced larger differences even with the same build and nothing changed, maybe other applications will see more speed improvement, the codebase is highly optimized down to OPCODEs looking at xdebug-profiles and probably the most tiny codebase depending on the configured modules out there given a total LOC around 250000 lines in theory (but that includes also admin baclaneds for all sort of servers....) _______________________________________________________________ /usr/bin/php Zend/zend_vm_gen.php --with-vm-kind=CALL
Server Hostname: corecms Concurrency Level: 50Time taken for tests: 30.158 seconds
Complete requests: 100000 Failed requests: 0 Total transferred: 383563326 bytes HTML transferred: 346464592 bytes Requests per second: 3315.84 [#/sec] (mean) Time per request: 15.079 [ms] (mean) Time per request: 0.302 [ms] (mean, across all concurrent requests) Transfer rate: 12420.25 [Kbytes/sec] received
Server Hostname: contentlounge Concurrency Level: 50Time taken for tests: 109.291 seconds
Complete requests: 100000 Failed requests: 0 Total transferred: 4806868605 bytes HTML transferred: 4758197006 bytes Requests per second: 914.99 [#/sec] (mean) Time per request: 54.645 [ms] (mean) Time per request: 1.093 [ms] (mean, across all concurrent requests) Transfer rate: 42951.58 [Kbytes/sec] received_______________________________________________________________ /usr/bin/php Zend/zend_vm_gen.php --with-vm-kind=HYBRID
Server Hostname: corecms Concurrency Level: 50Time taken for tests: 31.528 seconds
Complete requests: 100000 Failed requests: 0 Total transferred: 383561944 bytes HTML transferred: 346463930 bytes Requests per second: 3171.77 [#/sec] (mean) Time per request: 15.764 [ms] (mean) Time per request: 0.315 [ms] (mean, across all concurrent requests) Transfer rate: 11880.57 [Kbytes/sec] received
Server Hostname: corecms Concurrency Level: 50Time taken for tests: 31.248 seconds
Complete requests: 100000 Failed requests: 0 Total transferred: 383561400 bytes HTML transferred: 346462104 bytes Requests per second: 3200.20 [#/sec] (mean) Time per request: 15.624 [ms] (mean) Time per request: 0.312 [ms] (mean, across all concurrent requests) Transfer rate: 11987.03 [Kbytes/sec] received
Server Hostname: contentlounge Concurrency Level: 50Time taken for tests: 106.127 seconds
Complete requests: 100000 Failed requests: 0 Total transferred: 4806870511 bytes HTML transferred: 4758196867 bytes Requests per second: 942.27 [#/sec] (mean) Time per request: 53.063 [ms] (mean) Time per request: 1.061 [ms] (mean, across all concurrent requests) Transfer rate: 44232.14 [Kbytes/sec] received
Server Hostname: contentlounge Concurrency Level: 50Time taken for tests: 107.479 seconds
Complete requests: 100000 Failed requests: 0 Total transferred: 4806867967 bytes HTML transferred: 4758194770 bytes Requests per second: 930.41 [#/sec] (mean) Time per request: 53.739 [ms] (mean) Time per request: 1.075 [ms] (mean, across all concurrent requests) Transfer rate: 43675.61 [Kbytes/sec] received_______________________________________________________________ for rpmbuilders: %prep export LANG=C %setup -q -n php-%{version} %patch1 -p1 -b .realpath %if "%{version}" >= "7.1.0" %patch3 -p1 -b .systzdata-71 %else %patch2 -p1 -b .systzdata-70 %endif # rebuild 'data_file.c' from current system libmagic starting with PHP 7.2 and when /usr/bin/php is installed %if "%{version}" >= "7.2.0" if [ -f /usr/bin/php ]; then /usr/bin/php ext/fileinfo/create_data_file.php /usr/share/misc/magic.mgc > ext/fileinfo/data_file.c fi %endif # generate zend-vm when /usr/bin/php is installed %if "%{version}" >= "7.2.0" if [ -f /usr/bin/php ]; then /usr/bin/php Zend/zend_vm_gen.php --with-vm-kind=HYBRID fi %else if [ -f /usr/bin/php ]; then /usr/bin/php Zend/zend_vm_gen.php --with-vm-kind=CALL fi %endif