Home » Web Development

Improving Performance #1: Hyper Cache vs Super Cache 2

4 March 2009 4 Comments
Improving Performance #1: Hyper Cache vs Super Cache 2

WordPress is nice but it’s a bit of a hog CPU-wise. Jeff Atwood has a nice piece on this entitled “Behold WordPress, Destroyer of CPUs“.

We have a big set of releases coming up at work and I’ve become a bit obsessed with performance. We’re not using WordPress but I figured performance improvement, just like anything, starts at home. So ever since installing WordPress with this Arthemia theme I’ve been tweaking to try to get the most out of it.

I’m measuring performance using Fiddler 2, starting with clear browser, no cache and summing up the entire browser session, the HTML, CSS, JS and media. Not very scientific but better than nothing.

The first place to look was the plugin space and there are a few third-party HTML fragment caching plugins available. Naturally I tried WP-CACHE, that didn’t do much and is pretty much acknowledged as being out of date. It’s successor is an add on called “Super Cache” so I tried that. Not as smooth as I expected.

As soon as it was installed I noticed was my site throwing PHP errors all over the place. A few minutes debugging showed the config had incorrectly chosen some non-existent directory settings. With that fixed Super Cache started caching. I noticed de-activating and then re-activating this plugin screwed up the config and I had to manually edit some files each time. Less than ideal to say the least.

With caching on, response time improved as PHP no longer had to generate pages on the fly but I wasn’t blown away by any means.

After a few weeks I noticed the site would hang periodically and time out. Just doing nothing. I couldn’t diagnose this issue but once I de-activated Super Cache things seemed to come back to life.

My thinking is that Super Cache had used a Mutex to lock a file and somehow reached a race condition. In any case I started looking for a new caching product. That’s when I met Hyper Cache.

Hyper Cache is a lighter-weight caching plugin than the aforementioned SC. No directories to mess with, no editing extraneous files. I just installed it and off it went.

Measuring page rendering time through Fiddler there was not much improvement but the cache seems to rebuild faster with HyperCache and I haven’t had any mutex/file locking issues so far.

So with PHP on IIS I’ve found Hyper Cache worked better for me than Super Cache.

4 Comments »

  • Simone said:

    Thanks for sharing… exactly the kind of personal experience i was looking for ;)

  • Marco said:

    Exactly the answer I was looking for. Thanks for beeing so precise in few lines.

  • Netoco said:

    Thanks for the post, yep, Hyper Cache is a good choice of WP caching system, btw, I’m using it with DB Cache Reloaded. They work great for my blog.

  • IT Solutions said:

    There are many reviews about the 2 “competing caching plugins”. I absolutely loved WP SC. Pages were loading faster than any others … so at least it appeared that way. All was fine until I received a warning from my host. SC was killing their CPU. After reviewing a lot of benchmarks I found this combo to work the best.
    Hyper-Cache + Db Cache Reloaded (fix) + WP Minify.
    (many would chose W3 Total Cache for the sum of the 3′s features.)
    I am still going for the 3 ones.
    Hyper cache does pretty much what SC does … caches pages.
    Db Cache … caches sql queries (trust me this matters a lot on CPU load … and hosts care about it a lot.
    Wp Minify … is a little wonder which “shrinks” all your css, js.
    If someone has any links to proper benchmarks on caching … I’d love to see them too.

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.