WordPress performance revisited

Stefano asked if I had numbers to back up my previous performance claims regarding WordPress performance plugins. Today I ran some tests to be able to provide those numbers.

All tests were performed:

Results

The “baseline” results represent tests without DB Cache Reloaded, Hyper Cache, or GZIP Output plugins installed. Different combinations of these plugins were then tested. Each combination was tested 10 times and the results have been averaged.

This site (irama.org) — number of seconds to render HTML of the homepage
test baseline DB Cache Reloaded Hyper Cache DB Cache Reloaded + Hyper Cache DB Cache Reloaded + GZIP Output
1 0.325 0.294 0.299 0.409 0.292
2 0.458 0.447 0.322 0.318 0.335
3 0.366 0.267 0.493 0.290 0.313
4 0.287 0.299 0.765 0.331 0.269
5 0.740 0.319 0.393 0.311 0.512
6 0.807 0.276 0.315 0.435 0.354
7 0.351 0.270 0.348 0.280 0.343
8 0.347 0.403 0.361 0.292 0.290
9 0.412 0.298 0.321 0.336 0.263
10 0.418 0.263 0.286 0.364 0.267
Avg. 0.451 0.314 0.390 0.337 0.324
A more complex client site — number of seconds to render HTML of the homepage
test baseline DB Cache Reloaded Hyper Cache DB Cache Reloaded + Hyper Cache DB Cache Reloaded + GZIP Output
1 3.116 2.477 2.198 2.287 2.693
2 2.663 0.749 2.542 0.712 0.895
3 2.820 1.008 2.382 1.143 1.221
4 2.390 0.799 2.501 0.827 0.880
5 2.304 0.758 2.581 0.939 0.939
6 3.348 0.795 2.364 1.068 1.109
7 3.150 0.866 2.248 2.483 1.172
8 3.139 0.989 2.512 1.125 0.912
9 3.115 0.789 2.667 0.939 1.092
10 2.525 0.776 2.306 2.613 0.910
Avg. 2.857 1.001 2.430 1.414 1.182

Analysis

My previous recommendation of Hyper Cache was primarily because it provides GZIP compressed HTML. Since the results for DB Cache Reloaded + Hyper Cache were not as strong as DB Cache Reloaded alone, I looked for an alternative plugin that might provide GZIP compression without as much of a page render performance cost.

I tested the GZIP Output plugin, and while it still seems to negatively impact on page render time, I believe the addition of GZIP compression — which will lower the size of the transmitted HTML file — is worth the small hit on render performance.

Note: If your web server compresses HTML output from PHP files automatically (or it can be configured to do so) then use that approach instead of using the GZIP Output plugin as it is likely to perform slightly better. The other benefit of this approach is that compression will also be applied to the HTML output of PHP files that are not part of WordPress (if you have any).

Conclusion

In terms of performance (on a shared hosting environment) disk IO is expensive, but DB access is more expensive. So while Hyper Cache alone makes a difference, DB Cache Reloaded makes a greater difference. YMMV, but in light of this data, I would update my recommendation…

For best WordPress performance, use the following plugins:

  1. DB Cache Reloaded
  2. WP Minify
  3. GZIP Output (only if your web server doesn’t GZIP HTML output from PHP automatically).

Note: If DB Cache Reloaded is not an option with your hosting provider, or you aren’t able to get it working, Hyper Cache is still a good option (remember: you won’t need GZIP Output if you have Hyper Cache installed).

Finally…

I hope this helps. Let me know if you have feedback about my methods/results, or if you have other WordPress performance tips.

Posted in

2 Responses to "WordPress performance revisited"

Leave a reply