I recently migrated from WordPress to Octopress. During the migration I benchmarked the performance between WordPress and Octopress.
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
KeepAlive enabled, and tweaked connection limits. I also disabled
For PHP I installed and enabled APC.
I benchmarked the following configurations using the Apache benchmarking tool (
- WordPress Page Request
- WordPress Post Request
- Octopress Page Request
- Octopress Post Request
Each benchmark made 1000 requests for 50, 100, 150, and 200 concurrent connections using both
keep-alive. I performed each benchmark 3 times to average the result.
I created two graphs from the benchmark results:
- Average request per second
- Average time per request (in milliseconds).
Request Per Second
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
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
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.
The following are screenshots of memory and CPU usage graphs taken from my New Relic dashboard during the benchmarks.
With WordPress, the server spikes well above its physically memory and CPU limits.
With Octopress, the server has 60% of its physical memory available and
vi shows up in the Top 5 processes — wow.
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.
comments powered by Disqus