With the recent release of Backdrop 1.4, I wanted to take the opportunity to see how we are doing on our efforts to keep Backdrop running fast. Backdrop's mission is to make site ownership more affordable, and fast performance is a big part of that.

Backdrop is fully compatible with PHP 7, and we run every commit and pull request against both PHP 5.3 and PHP 7.0. From that experience, we already know that PHP 7 is a good way to get a faster Backdrop site.

Travis CI test results.
Travis CI Test Results for both PHP 5.3 and PHP 7

Though we have a rough idea from repeated test runs clocking in lower on PHP 7, exactly how much faster is Backdrop when running PHP 7? And how about Backdrop when compared with Drupal 7? Let's do some benchmarks!


I modeled my tests off of the excellent work done by Jeff Geerling in his post Benchmarking PHP 7 vs HHVM - Drupal and Wordpress. I used his most excellent Drupal VM project on GitHub to set up environments for each PHP version. I've attached the Vagrant config.yml files I used to create the sandboxes. Drupal VM 2.4.0 uses the following:

  • Ubuntu 14.04.4 LTS
  • MySQL 5.5.49
  • PHP 5.5.34, 5.6.20, and 7.0.5, OpCache is enabled on all versions
  • Apache 2.4.18

The host machine was a Dell XPS 9550, running Ubuntu 15.10, 32GB RAM, i7-6700HQ Skylake processor.

Incidentally had absolutely no problem running Backdrop CMS in Drupal VM. Just drop it in and it worked side-by-side the Drupal installation.

Each site was installed with the Standard profile, default configurations of everything, with no core modules enabled or disabled out of the box. Devel Generate module was installed to generate 50 nodes to populate the homepage.

Each test was run 3 times, using Apache Bench, the highest average request per second result was kept out of the three runs. Drupal 7 and Backdrop were installed on the same VM, side-by-side in different directories. So regardless of how running benchmarks inside of a VM may affect results, at least both systems were on equal footing. One adjustment I made that differed from a typical Drupal VM install is that I switched file system mechanism to rsync, which has better performance and is important for Backdrop, which reads configuration files directly from disk.

Anonymous, Page Cache Enabled

For this test, the page cache was enabled in both Drupal 7 and Backdrop. 5 minute cache lifetime. The Backdrop background-fetch was enabled in Backdrop, though that shouldn't have an effect on speed because the cache will be fully primed before testing. Then I loaded the front page 750 times with 10 concurrent connections.

ab -n 750 -c 10 http://drupalvm55.dev/drupal7
ab -n 750 -c 10 http://drupalvm55.dev/backdrop
Anonymous, Page Cache Enabled charts
  PHP 5.5.47 PHP 5.6.20 PHP 7.0.5
Drupal 7.43 648.58 req/s 625.32 req/s 814.01 req/s
Backdrop 1.4.2 801.21 req/s 793.52 req/s 1080.66 req/s

Backdrop shows a clear advantage on anonymous page caching, between 20% and 30% faster! This is largely due to two factors:

  • Drupal 7 executes at least two SQL queries, including loading all variables (which can get quite large) and then the page cache itself. Backdrop uses the configuration system to read a much smaller set of configuration from the system.core.json file and only does a single SQL query to serve the page.
  • Backdrop deprecated and disabled by default hook_boot() and hook_exit() on cached pages. This makes Backdrop behave more consistently across different platforms when a reverse proxy like Varnish is used, or when using a CDN.

Both Drupal 7 and Backdrop may be configured to avoid any database queries at all, which would yield improvements for both systems. But in such cases a reverse proxy would be the best solution, in which case the speed of the anonymous page cache hardly matters at all.

And as has become common knowledge, PHP 7 sweeps the older versions of PHP, more than 30% faster than the previous versions for both Drupal and Backdrop.

Anonymous, Page Cache Disabled

For this test, I disabled the page cache on both Drupal 7 and Backdrop and loaded the front page 750 times with 10 concurrent connections.

ab -n 750 -c 10 http://drupalvm55.dev/drupal7
ab -n 750 -c 10 http://drupalvm55.dev/backdrop
Anonymos with cache chart.
  PHP 5.5.47 PHP 5.6.20 PHP 7.0.5
Drupal 7.43 72.39 req/s 75.22 req/s 139.32 req/s
Backdrop 1.4.2 70.61 req/s 67.58 req/s 136.14 req/s

When loading the front page without the page cache, Backdrop falls just short of Drupal 7 performance, about 2% slower on PHP 5.5 and 7. For some reason it slipped on PHP 5.6, where it was 11% slower. While Backdrop and Drupal 7 share a very similar codebase, the collection of out-of-box modules varies signficantly. See the end of this post for a module comparison.

Authenticated, Administration Page

For this test, I started a session with UID #1, then retreived the cookie from the browser and used it in ab.

ab -n 750 -c 10 -C "SESSxxx1=yyy1" http://drupalvm55.dev/drupal7/admin
ab -n 750 -c 10 -C "SESSxxx2=yyy2" http://drupalvm55.dev/backdrop/admin
Administrative pages charts.
  PHP 5.5.47 PHP 5.6.20 PHP 7.0.5
Drupal 7.43 120.00 req/s 138.63 req/s 213.42 req/s
Backdrop 1.4.2 116.88 req/s 121.88 req/s 219.82 req/s

In this test, results mostly mirror the anonymous page cache situation. Drupal 7 is 2% faster on PHP 5.5 and the margin for Drupal is largest on PHP 5.6, where Drupal is 13% faster. Backdrop eeks out a small gain on PHP 7 where it is 2% faster.

So is Drupal 7 or Backdrop Faster?

From these tests it looks like Backdrop is signicantly faster for anonymous users when cached, but slightly slower on non-cached pages. It should be noted that both of these systems are comparing out-of-box functionality. Both Backdrop and Drupal 7 have differing modules available and enabled by default, here's a summary of the differences:


  Drupal 7 Backdrop 1.4
Administration bar  
Configuration manager  
Project Installer  
Views UI  

This difference in modules, especially Backdrop's Panels-port, Layout, have increased the amount of code executed on each page load. Through a balance of removing modules and a few abstractions, Backdrop manages to provide some major features while maintaining Drupal 7 level performance.

What about Backdrop versus Drupal 8?

The situation between Drupal 7 (or Backdrop) and Drupal 8 is more complex, with differing levels of cache, different out-of-box settings, and attempting to compare percieved performance instead of the simpler requests per second measurement. As such, comparing Backdrop and Drupal 8 could be a tricky and possibly subjective topic. There have been a lot of comparisons already published between Drupal 7 and Drupal 8. The situation between Backdrop and Drupal 8 will be very similar to that of Drupal 7 and Drupal 8. Although we have cache improvements in places throughout Backdrop, caching essentially remains the same between Drupal 7 and Backdrop when it comes to benchmarking. I'd encourage readers to search for comparisons between Drupal 7 and 8 and take everything with a grain of salt, then compare that with what they've read here.