W3 Total Cache versus WP Super Cache

  Share    


memcached w3 total cache W3 Total Cache versus WP Super Cache

Update: As of today October 21, 2009, I am re-testing W3 Total Cache, and finding it partially lives up to the performance claims. The issue I had described below was related to an installation problem that I attributed to the plugin. I am writing another in depth analysis, and how to, detailing W3TC and how to avoid a bad experience, so you can reap all the benefits this plugin has to offer. A link to the new article will appear here when I have completed my testing.

I’ve been using WP Super Cache for several years with WordPress to help handle high volumes of traffic, and it has done a great job. WP Super Cache is a static caching plugin for WordPress that generates html files that are served directly by Apache without processing comparatively heavy PHP scripts. WP Super Cache can also be configured to serve the static html files by Nginx, but the setup is a bit more time consuming.

A few days ago I heard about a new WordPress caching plugin called W3 Total Cache, which claimed to literally do-it-all. The author implemented every speed enhancing feature he could think of, and then added even more. W3 Total Cache claims to offer the following features and benefits:

  • Improved progressive render (non-blocking CSS and JS embedding)
  • Transparent content delivery network (CDN) support with automated media library import
  • Bandwidth savings via Minify and HTTP compression (gzip / deflate) for HTML, CSS and JS
  • Minification (concatenation, white space removal) of inline, external or 3rd party JS and CSS with scheduled updates
  • Caching of RSS/Atom feeds (comments, page and site), URIs with query string variables (like search result pages), database objects, pages, posts, CSS and JS in memory with APC or memcached or both
  • Increased web server concurrency and reduced resource consumption, increased scale
  • Reduced HTTP Transactions, DNS lookups, reduced document load time
  • Complete header management including Etags
  • Optional embedding of JS just above </body>

Besides uploading and activating the W3 Total Cache, you’ll also need to install and setup either Memcached, or APC, but the plugin author leans heavily towards Memcached.

Memcached would be our choice if we had to choose between Memcached and APC. What is Memcached? Memcached iis a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. The downside to using Memcache is that it runs as a demon on a set port, so it is open to security attacks on your server on that port, so it’s good to turn on your firewall to protect that port.

A much better object caching system is Xcache, which doesn’t need to run as a demon, and in my opion is far better than Memcached and APC in most server environments. I’ve run Xcache under extreme server loads, and it didn’t even hiccup, plus there’s no port to worry about securing.

I spent a full day setting up, configuring, and testing W3 Total Cache, and Memcached. I compared the size of the files downloaded by my readers, the speed the files were transferred, and both the CPU load and RAM required.

The performance of W3 Total Cache was not much different than WP Super Cache in serving pages. The huge difference I saw was on the server side. The CPU load increased exponentially from 20 times higher to even higher at times. I was forced to cut my testing short, and both turn off Memcache, and remove the W3 Total Cache WordPress plugin comletely. I tested version 0.7.5.

In my opinion the W3 Total Cache plugin needs to address performance issues on the server side before it is ready for mass use.

I’ve since gone back to using WP Super Cache, and everything is running smoothly again with little CPU load. The Apache web server can serve and compress static html files very efficiently, without the huge, and unnecessary, increased CPU load caused by W3 Total Cache. There appears to be little need to have a plugin like W3 Total Cache. There is a better way to build a high performance web server, with far less server load, that I’ll discuss in another article.


Related Posts:


Posted on September 2, 2009 at 10:12 am(PST)
Tags: | | | |


11 Responses to “W3 Total Cache versus WP Super Cache”

  1. Mixologic says:

    You should seriously update this article. Comparing W3 total cache to WP Super cache is comparing apples to a whole basket full of fruit (which also has apples in it). WP super cache provides disk caching. Thats it. W3 total cache provides disk caching, Javascript and CSS combining (reducing http requests), javascript, css, html minification and gzipping (reducing bandwith, transfer time), comes preconfigured with a sensible htaccess file to set proper browser cache settings (again reducing hits to your server). Oh, *and* it supports an object cache for your minified stuff, your db query results, + cdn integration.

    Sidenote regaring APC vs. Memcached, this is a totally moot argument. If you have one server, you use APC. If you have multiple servers you use memcached *and* APC, because APC is both an opcode cache for php, *and* an in memory object cache where memcached is just an object cache (though network aware).

  2. Rahul Bansal says:

    Great post Nerd!
    I too personally do not like memcache.
    I vote for APC or xcache.

    Does this (W3 Total Cache) works with nginx+Wordpress-MU+Domain Mapping???

    Also waiting for ur next post in this series.

    -Rahul

  3. Nnyan says:

    Like the others I am going to track this site for the update.

  4. Keith Davis says:

    Any update on this/
    I’m trying to speed up my blog and am lookingh at WP super cache and W3 Total Cache.
    This post has moved me towards WP super cache, which most sites appear to use.

  5. @ian / @Vic, there are many misconnceptions with the role of memory caching. The first versions of W3TC were developed on and for media temple virtual private servers with 256MB of RAM. Using APC or memcached for page cache, database cache and minify cache produced at least a 25x improvement for every blog tested. Database load dropped by 60%. The use of self-hosted CDN brought sites from 10-12s pages loads to 3-4s with lighter server loads.

    With later releases, unless you have a multiple server configuration memory caching is not necessary or is in fact counter productive. Now you can cache your database queries to disk (now usually 80% or more), minify / page cache to files used by apache and even more CDN options.

    So in short, every single issue of higher load is either misconfiguration of the plugin or software it supports.

    You don’t need APC or memcached (memcache) to get WordPress to perform at it’s best. And with CDN/Minify and database caching, even a shared hosting account can realize much more scale and responsiveness.

  6. Ian says:

    Also looking forward to your update. We have had problems with load since switching to W3 Total Cache, but it sounds like you got yours somewhat worked out, so I’m anxious to see how.

  7. Vic says:

    Looking forward to your update. I have 8GB of RAM on my site that gets 1/7MM pageviews a month and the plugin used so much RAM it crashed my server.

  8. Alex says:

    Hi!
    Very interesting article!
    I use HyperCache, and I like it more than Wp-Super-Cache, because of it has lots of configurations.
    Do you have a comparative between Wp-Super-Cache an HyperCache?

Leave a Reply

© Copyright Nerd Grind 2009 - 2010. All rights reserved.