Charlie Harvey

Drupal 7 web server performance shootout: nginx vs Apache

I was interested to see how nginx would play with Drupal 7 and how much performance boost I’d get as compared to Apache . As it turns out an extra ~50 requests a second and a lower overall system load (as measured by top).

This is quite a high res screencast (thanks kazam!), so you might want to look at the high resolution version.

I tested a fresh install of d7, with minimal modules, and with caching turned on on my laptop. The php was a stock Debian one. I had the APC installed in its out of the box Debian Squeeze configuration. Both apache and nginx were flooded with ab. I used a concurrency of 100 (as high as it goes) like this: $ ab -c 100 -n 1000 http://d7/ d7 was set up as a namebased virtual server on both servers, and added to my hosts file. Of course benchmarks using ab are not a hugely realistic model of how an actual webserver gets used. Tools like siege are closer to reality, but hey, this is just my own curiosity.

A quick note on the music, its a band/person/thing called Lupus, whose music is under Creative Commons. You can hear the album its from, Hurlement primaire over on Jamendo.


  • Be respectful. You may want to read the comment guidelines before posting.
  • You can use Markdown syntax to format your comments. You can only use level 5 and 6 headings.
  • You can add class="your language" to code blocks to help highlight.js highlight them correctly.

Privacy note: This form will forward your IP address, user agent and referrer to the Akismet, StopForumSpam and Botscout spam filtering services. I don’t log these details. Those services will. I do log everything you type into the form. Full privacy statement.