PHP 8.0 and 7.4 benchmarks on Symfony: JIT performance improvement up to + 9% along with OPCache preload

We invite future students of the "Symfony Framework" course and everyone who wishes to sign up for an open webinar on the topic "Micro-frameworks: Comparing Symfony and Symlex Performance".



We are also sharing the translation of a useful article.










PHP 8.0 is due out on November 26, 2020, followed shortly by the latest version of Symfony 5.2. Here is a series of benchmarks performed on the latest versions of both projects. This is a pure hello world scenario and should be taken as such. Only relative performance matters. In the real world of YMMV (your results may differ from these).





1: JIT PHP 8.0, . , !





2: PHP 8.0.0 Symfony 5.2.0 . , , .





PHP 8.0-RC5 Symfony 5.2-RC2. , , . Hetzner Helsinki CCX11 (2 , 8 ), , . Ubuntu 20.20 PHP, .





Symfony 5.2 . HTML 100 999. (1, 10, 25, 50, 100) .





PHP-FPM Nginx:





  • PHP 7.4 OPCache





  • PHP 7.4 OPCache





  • PHP 8.0 OPCache





  • PHP 8.0 OPCache





  • PHP 8.0 OPCache JIT 





OPCache - OPCache:





opcache.preload_user=www-data
opcache.memory_consumption=1024
opcache.interned_strings_buffer=256
opcache.max_accelerated_files=30000
opcache.validate_timestamps=0

# only when OPCache Preloading was enabled
opcache.preload=/var/www/php80/var/cache/prod/App_KernelProdContainer.preload.php

# only when JIT was enabled
opcache.jit_buffer_size=512mb
opcache.jit=1225
      
      



hey, (req/s) (). , .





, PHP 7.4, 8.0 OPCache. PHP 7.4 , . , , 10 100 , PHP 8.0 JIT, , , 7.4 OPCache, 25+ .





, . OPCache , PHP 7.4 8.0. ( , ) PHP 8.0 , 7.4, . , 10 100. 8.0 JIT : , .





, Symfony, PHP 8.0 7.4. , , JIT PHP 8.0, PHP 7.0, , .





, JIT , OPCache. , , . , JIT PHP.





, 7.4 8.0 . , PHP 7.3 7.4 OPCache. , PHP 8.0 . . , , ( 4.4 PHP 5.0 2004 ). 8.x.





Discourse: PHP 8.0 7.4






"Symfony Framework".



": Symfony Symlex".





OTUS . .   OTUS.





, " " -   .












All Articles