Better performance from WP Super Cache

If you use the WP Super Cache WordPress plugin (and you should, if you use WordPress), it has a settings page section titled “Expiry Time & Garbage Collection”. It sets the “Expire time” to 3600 seconds by default, and warns that you should set it lower on a busy site.

That advice makes sense if you have a sudden surge of traffic to a single page. However, if your site is generally very busy across all pages (for example, if you have an archive of hundreds or thousands of posts that are constantly being indexed by search engines), we’ve found that you should do the opposite to improve performance: set it much higher. We recommend setting it to 172800 seconds (which is 48 hours). This can cut your CPU usage in half, which will speed up your site.

The reason for this is that when WP Super Cache creates a cached page, it wants to make sure that those pages don’t build up forever. Every ten minutes or so, it looks through them all and deletes any that are older than the “expire time”.

On some servers that use a network file system called “NFS”, looking through a large number of files causes performance problems. That’s why the WP Super Cache author recommends making them expire quickly: it reduces the number of files it has to examine each time.

On our servers, we don’t use NFS and looking through lots of files does not cause a performance problem. Leaving the files for a longer time is safe and increases the chance that a page will already be cached when it’s needed.

If you’re a Tiger Technologies customer who makes this change and you want to see how it affects the CPU usage, just let us know and we can provide you with details.

5 Comments so far

  1. How about W3 Total Cache? There’s more features (CDN integration, etc) and it’s able to cache on memory, good for private server but also able to cache on disk (which blogs on shared web hosting usually do).

    Currently I use it for my personal blog (which already perform very good with Tigertech hosting), but even more with that plugin.

  2. yos wrote:

    How about W3 Total Cache?

    We can’t recommend W3 Total Cache, unfortunately. We’ve seen customers switch to it and completely kill the performance of their site.

    We don’t know why it caused problems in those cases, but we’re sticking with WP Super Cache ourselves….

  3. W3 total cache settings are simple (once you understand them), if you have a standalone server use disk enhanced method for page cache — if you have a slow disk or underpowered server disk caching for database or HTML minification is not a good idea. however, if your server is underpowered you’ll definitely want to use the CDN functionality with a good provider like http://maxcdn.com. unfortunately, there are so many options available that some users of the plugin may not know what’s best for their case. the plugin seems to be making those more clear with the next release (i was someone who had trouble understanding all of the options, and once I did everything clicked).

  4. I use scopehosts.com . How can i check if they use NFS ?

  5. You should contact scopehosts.com and ask them. NFS is a basic part of their network infrastructure (if they are actually using it), and only they would know if they are using it internally.

Add a comment

Fields in bold are required. Email addresses are never published or distributed.

Some HTML code is allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
URIs must be fully qualified (eg: http://www.domainname.com) and all tags must be properly closed.

Line breaks and paragraphs are automatically converted.

Please keep comments relevant. Off-topic, offensive or inappropriate comments may be edited or removed.