Skip to a section of this page:

Archive for December, 2009

WordPress performance revisited

Sunday, December 6th, 2009

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
testbaselineDB Cache ReloadedHyper CacheDB Cache Reloaded + Hyper CacheDB Cache Reloaded + GZIP Output
10.3250.2940.2990.4090.292
20.4580.4470.3220.3180.335
30.3660.2670.4930.2900.313
40.2870.2990.7650.3310.269
50.7400.3190.3930.3110.512
60.8070.2760.3150.4350.354
70.3510.2700.3480.2800.343
80.3470.4030.3610.2920.290
90.412 0.2980.3210.3360.263
100.4180.2630.2860.3640.267
Avg.0.4510.3140.3900.3370.324
A more complex client site — number of seconds to render HTML of the homepage
testbaselineDB Cache ReloadedHyper CacheDB Cache Reloaded + Hyper CacheDB Cache Reloaded + GZIP Output
13.1162.4772.1982.2872.693
22.6630.7492.5420.7120.895
32.8201.0082.3821.1431.221
42.3900.7992.5010.8270.880
52.3040.7582.5810.9390.939
63.3480.7952.3641.0681.109
73.1500.8662.2482.4831.172
83.1390.9892.5121.1250.912
93.1150.7892.6670.9391.092
102.5250.7762.3062.6130.910
Avg.2.8571.0012.4301.4141.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.

WordPress performance

Friday, December 4th, 2009

As promised, here’s a quick rundown of the WordPress performance plugins I’ve been using.

  • DB Cache Reloaded = Big performance wins. Especially on shared hosting.
  • Hyper Cache = Less noticeable improvement than DB Cache, but still noticeable.
  • WP Minify = Essential. Every website should combine, minify then cache static text assets (like CSS and JavaScript) for production.

Note: I have used WP Super Cache in the past and have run into problems. Apparently it doesn’t perform too well on shared hosting setups. Also, in my experience, DB Cache outperforms Super Cache every time.

I have other thoughts about web performance that I’d like to share, but not today. Let me gather my thoughts some more and get back to you.

Know of any other good WordPress performance tricks? Leave a comment.

So long MT, G’Day DH

Friday, December 4th, 2009

Well, it wasn’t easy, but I’ve done it: I have migrated my sites away from MediaTemple (MT) to DreamHost (DH).

Why the change? Performance mainly.

MediaTemple has given me decent stability and good support over the last few years. And most of all I’ll miss that gorgeous, minimal admin control panel.

But the performance has been poor at best. Even with WordPress caching plugins installed, page renders averaged 3 seconds, not including the fairly frequent spikes (of up to 30 seconds) which would occur every 5 attempts or so.

And while they seem to have more constant outages (two of which have affected me already), the overall page render performance at DreamHost has been at least twice as good (< 1 second for page render on average) as MediaTemple and far more consistent (i.e: no spikes). For those who are interested, without caching plugins installed, the difference was far more pronounced (averages of 13 seconds for MT and 2 seconds for DH).

The DreamHost control panel isn't quite as minimal or as gorgeous, but it is much better organised than others I tried, and has all the functionality I require.

I should note here that these performance results (especially the DreamHost results) are based on a limited period of testing. So I’ll keep you posted as to the service and performance longer term. But it is safe to say that the performance of my previous provider has been less-than-ideal for a long time, hence the move.

For those interested in WordPress performance, I’ll post a follow up about the plugins I’m using.