Varnish and Squid are so great, why something else?
Fear of stale content. There are some scenarios where there is no reliable way of purging the proxy cache when a cached item has changed. In these cases, caching in memory via the Page Cache Manager is the solution. The alternative would risk serving stale content when an item is changed.Cache Setup handles all of this on your behalf, except I had a yearning for faster performance.
So I got a hold of MemcachedPageCacheManager (had to do an svn checkout from the collective). I also need to install memcached (on Ubuntu that's 'aptitude install memcached).
The performance on a modest server (1 GB Ram, 1.6 ghz) looked like this:
Without CacheSetup: 0.2 requests/per/second
With CacheSetup installed and enabled (no tweaking): 3 to 4 requests/per/second
With CacheSetup installed and MemcachedPageCacheManager: 40 requests/per/second
So doing a drop in replacement of PageCacheManger with MemcachedPageCacheManager gave me a 10 fold performance increase.
Important Notes
MemcachedPageCacheManager does not provide a way to edit the "Page Cache threshold entries" and the "Cache cleanup interval (seconds)". As a result this breaks the Cache Settings > Memory Tab (page_cache_config.cpt). I created my own version of the "Memory Tab" via, mostly because, cosmetically it looked better.This
looked better than This:
2 comments:
Great post! You should get this blog added to Planet Plone.
Also you had described the various scenarios in IRC re: when you might want to use this module vs. the varnish which you don't touch on in your post. Can you reiterate those here?
is your patch has been report to the collective ?
Post a Comment