Early Drupal 7 vs Drupal 8 performance comparison
I'm very excited about the upcoming Drupal 8 release and its features and even though I'm not a core developer (yet), I follow its development as close as I can. There are numerous blog posts about it and the new features it has. There are hundreds (if not thousands) of issue queues where you can watch our community discuss and build the new system, you can even try the freshest dev release by using SimplyTest.me.
But, while there is a vast amount of information about Drupal 8, I couldn't find any metrics about how it will compare with Drupal 7 performancewise. I know that we're not in code freeze yet and that performance improvements are scheduled for the "polish phase" which officially starts on 1 July, but I was curious to see how Drupal 8 performs at this stage, where many API's have changed, a lot of hooks have been replaced and a new framework is implemented into it (Symfony2).
So, I thought that since there was no such information on the net yet, I would find out myself. So, here is a quick and dirty performance comparison between the latest Drupal 7 version (7.22) and the latest dev build (1 June) of Drupal 8.
Test setup & methodology
I downloaded and installed both systems on my MacBook Air (1.7 Ghz Intel Core i5, 4Gb 1600 Mhz DDR3 RAM) and measured requests per second on MAMP with PHP 5.4.4. I used ab (apache benchmark) with 20 concurrent requests (-c 20 -n 20). So, on the following table, you can see the amount of requests per second that MAMP was able to serve for 4 different cache settings and 3 default pages: Admin home page and site homepage as it comes when you install the Drupal standard profile for both anonymous and logged in users.
For each metric, I used the highest number I got after 10-15 consequent measurements.
Requests/sec (more is better)
Drupal 8 dev
APC & internal cache disabled
|admin homepage (/admin)||10.25||5.07|
|homepage, logged in||10.57||4.25|
|homepage for anonymous users||11.66||4.56|
APC disabled, internal cache enabled
|admin homepage (/admin)||10.32||5.09|
|homepage, logged in||10.58||4.17|
|homepage for anonymous users||114||37|
APC & internal cache enabled
|admin homepage (/admin)||49||14.02|
|homepage, logged in||43||11.44|
|homepage for anonymous users||491||147|
APC enabled, internal cache disabled
|admin homepage (/admin)||50||14.17|
|homepage, logged in||43||11.43|
|homepage for anonymous users||65||14.04|
When I saw the results, I got disappointed. I had a secret hope that I would see Drupal 8 perform better, even though this was not the logical result.
In the above table we see a 50%-78% performance regression which is rather big. Do you think this is the expected result? Do you see any flaws in the above methodology? Am I missing something? At which phase do you think it would be wise to test again? Feel free to leave your comment below.
Anyhow, I hope the Drupal community will do a really good job at the polish phase and deliver a really fast Drupal 8.