PHP Performance on Concrete5 Version 7
It's not infrequent we come across sites running on PHP 5.3 and cringe at the thought of running a potentially insecure and unsupported version of the language. But aside from that we should take care to look at the other tangible benefits of running a more modern version of PHP, namely performance and stability. With the latest version of concrete5 we're able to even run PHP7 and we're about to show you what's so exciting about that.
Below is a table of our findings. The requests were made against the default home page of concrete5 version 7.
About the Results
The sections with Concurrency Level, Average TTFB (Time to first byte), and Results File are the results of ApacheBenchmark. The TTFB is measured in milliseconds, and as you can see the more requests per second we throw at it the more it slows down. But perhaps what's most interesting here is that PHP7 with opcache at 10 concurrent requests averages a lower TTFB than PHP 5.3 does serving up only 1 requests at a time, and also outperforms all other versions of PHP at 10 concurrent requests by at least 53% and as much as 214%.
The Siege Results, were taken from a HTTP stress tester known as Siege. These are the results that came from throwing ~40 concurrent requests repeatedly at the server for 60 seconds, when one of the requests finished another one was sent. The Transactions is the number of successful requests processed. The Availability percentage indicates out of the 40 "users" making request, how often did the request succeed. Finally the Response Time in seconds is on average how long did it take to receive a response.
As we can see from these results, PHP7 with opcache enabled is the clear winner when it comes to performance, serving up requests 4x faster than PHP 5.3. Additionally the average response time under load was 1/4 of what it was and when not under load it was consistently half. Another aspect which I feel is important when looking at the results is the Availability. Most websites don't just have a nice steady stream of requests all day long, there are lulls and spikes in traffic. These results show a pretty clear distinction on scalability with the newer versions of PHP, and the overall performance improvements that having opcache can have for you. By default PHP 5.4 and PHP 5.3 don't even offer opcache, you have to manually add the PECL module and many web hosts don't do this.
For those interested in viewing the details you can download the full results: PHP7_Concrete5_Tests.zip
Concrete5 Page Speeds
Whether you're looking for the version of PHP to serve up the most requests or have the fastest load times, PHP7 will definitely serve you well. If you'd rather go with something a little bit less bleeding edge and more widely tested across concrete5 websites, PHP 5.6 with opcache is most likely your next best bet. If you can't get opcache, try checking if you are offered xcache, as it also has some decent performance advantages (even though I didn't benchmark in the above list I can tell you from experience that they produce similar results to opcache).