Benchmarks do PHP 8.0 e 7.4 no Symfony: melhoria de desempenho JIT de até + 9% junto com o pré-carregamento OPCache

Os futuros alunos do curso "Symfony Framework" e todos os interessados ​​estão convidados a se inscrever em um webinar aberto sobre o tópico "Microframes: Comparando Symfony e Symlex Performance".



Também estamos compartilhando a tradução de um artigo útil.










O PHP 8.0 será lançado em 26 de novembro de 2020, seguido em breve pela última versão do Symfony 5.2. Aqui está uma série de benchmarks realizados nas versões mais recentes de ambos os projetos. Este é um cenário de puro hello world e deve ser considerado como tal. Apenas o desempenho relativo é importante. No mundo real do YMMV (seus resultados podem ser diferentes destes).





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