Benchmark: Octopress vs. WordPress

Main Thread 2 min read

I recently migrated from WordPress to Octopress. During the migration I benchmarked the performance between WordPress and Octopress.

Server Configuation

Last summer I migrated WordPress to Amazon EC2. I decided to stay on EC2 for Octopress for two reasons. First, a micro instance is, essentially, free. Second, if the micro instance can serve a WordPress blog, it can serve a static HTML blog.

I made a few optimizations to the Apache configuration. Namely decreased Timeout, KeepAlive enabled, and tweaked connection limits. I also disabled AllowOverride.

For PHP I installed and enabled APC.

WordPress used object-cache and Hyper Cache.

Benchmark Configurations

I benchmarked the following configurations using the Apache benchmarking tool (ab):

  1. WordPress Page Request
  2. WordPress Post Request
  3. Octopress Page Request
  4. Octopress Post Request

Each benchmark made 1000 requests for 50, 100, 150, and 200 concurrent connections using both close and keep-alive. I performed each benchmark 3 times to average the result.

Benchmark Results

I created two graphs from the benchmark results:

  • Average request per second
  • Average time per request (in milliseconds).

Request Per Second

Graph: Requests Per Second
Requests Per Second (Connection: close)
Graph: Requests Per Second (keep-alive)
Requests Per Second (Connection: keep-alive)

Without surprise, Octopress is faster than WordPress. Roughly 3 times faster (300%). In some cases reaching an impressive 2,000 requests per second for close connections, and nearly 3,000 requests per second for keep-alive connections.

Octopress performed the same as WordPress for page requests with 200 concurrent close connections. However, this implicates the micro instance more than Octopress or WordPress.

Time Per Request

Graph: Time Per Request
Time Per Request (Connection: close)
Graph: Time Per Request (keep-alive)
Time Per Request (Connection: keep-alive)

The time per request results are similar to the requests per second results. Even the page request anomaly appeared. Nevertheless, Octopress is still faster than WordPress.

For most of the benchmarks, Octopress response times were under 100 milliseconds. This not only improves user experience, but search engine optimization as well.

Sever Stats

The following are screenshots of memory and CPU usage graphs taken from my New Relic dashboard during the benchmarks.

Server Stats: WordPress
Server Stats: WordPress

With WordPress, the server spikes well above its physically memory and CPU limits.

Server Stats: Octopress
Server Stats: Octopress

With Octopress, the server has 60% of its physical memory available and vi shows up in the Top 5 processes — wow.

Benchmark Conclusion

It's no surprise Octopress is faster than WordPress. Octopress uses static files whereas WordPress uses 10,000 lines of PHP code performing various database queries. While you can make WordPress faster, it's worth nothing that without caching WordPress did not finish any of the benchmarks above. In fact, it crashed my server.

I plan to add another benchmark configuration for nginx and possibly Varnish. In addition, I'm monitoring the potential search engine optimizations from this migration. Look for posts on both in the coming months. In the meantime, I welcome your feedback.

Find this interesting? Let's continue the conversation on Twitter.