Symfony UX makes Symfony a Full Stack Framework (again).Running Symfony without a web server on Docker using PHP-PM » Site Search « Drop-dead simple SASS builds in Symfony Flex with Webpack Encore Written by Jani Tarvainen on Saturday October 14, 2017 Symfony Benchmarks: Scaling PHP by adding CPU & RAM.Symfony Benchmarks: PHP 5.6, HHVM 3.11 and PHP 7.0.1.More PHP performance articles on this sit: Notably this only happened with running the rendered page, but not the API endpoint. It is worth noting that there was a memory leak in PHP 7.2 (RC4) when running benchmarks, so you might want to set PHP-FPM setting pm.max_requests to something else than the default value 0 to avoid swapping in long running environments. In the meanwhile the team continues to work on 7.3 with further DCE improvements and the JIT engine that has been in the works for some time now. 7.0 type leap, but as said this was expected.
It seems like the optimisations come into play at 50 & 100 concurrency where 7.1 stalls, but 7.2 remains constant.Īs always, take any benchmark results should be taken with a grain of salt, but PHP 7.2 does seem to deliver a sizeable boost at least with Symfony Flex (with 3.3 components) when running at high concurrencies. When calling the API backend controller without any Twig rendering tasks, the differences between 7.1, 7.2 and 7.2-DCE are quite significant. Maybe a result of the OPCache improvements? DCE, it seems like it further boosts performance - making the difference between PHP 7.1 and 7.2 significant at higher concurrencies. Using the front page controller with Twig rendering there is some differences with PHP 7.1 and 7.2, which result to some percentage points of difference.
In addition to the standard PHP 7.2 configuration, I also tested with enabling Dead Code Elimination (DCE) optimisations which will be further developed in PHP 7.3. The database in use is SQLite, with the API controller having some simple TTL caching to verify the DB we're not benchmarking the database.īenchmarks were ran three times and the average results are displayed. For PHP the setup using the official PHP-FPM images of PHP 7.2 RC4 and PHP 7.1. The benchmarks were ran on a Virtual Private Server (VPS) on UpCloud ( try free trial for high performance VPS) with a1 CPU and 1GB of RAM. The Docker setup is based on the Symfony Flex example from Kevin Dunglas, which I found a pleasure to work with. The project now has the required configuration to run it with Docker, and you can find the full source on GitHub. The benchmarked application is the Symfony Flex port of the hybrid application I did back in January. With containers becoming the norm, switching versions in hosting is a simple operation.
But it does come with some improvements like Argon2 password hashing and is a drop-in upgrade for most contemporary PHP projects. Like PHP 7.1 before it PHP 7.2 is not promising any significant performance improvements. I was exploring Symfony Flex with Docker setup and thought I would do a quick round of tests to compare the differences in PHP 7.1 and 7.2 (RC4) regarding performance with a few benchmarks. PHP 7.2 will be launching soon, in fact it has already reached Release Candidate status.