Evaluating Memcached for our site. Looking for advice.

Rob Sharp rob.sharp at thesoundalliance.net
Mon Oct 22 00:39:55 UTC 2007

On Fri, 2007-10-19 at 12:19 -0700, Jason Gross wrote:

> I am evaluating memcached for our web farm and wanted to poll this  
> list for some experience in designing, deploying and maintaining it.  
> Specifically I want to analyze the overhead from a development /  
> resource and maintenance standpoint so that I can properly plan this  
> effort. Would anyone on this list be willing to share their  
> experience with deploying memcached?
> The site I am working on is a social networking site that users can  
> upload individual products which other users can comment on, purchase  
> etc. The site is growing quite rapidly and is beginning to show  
> significant slowdowns during peak periods. I have a decent  
> understanding of what memcached provides and feel that its compelling  
> enough to give it a try as there are a significant amount of database  
> queries on each page load. I'd be interested in any feedback but have  
> some specific questions below of what I am looking for.
> 1. Are there tools that exist to help analyze which queries should be  
> cached?

Slow ones. If you're in MySQL, you can set up the MySQL slow query log
to help you here.

> 2. What exists  to monitoring and analyze for cache performance on a  
> daily basis?

We have a page which simply displays extended stats for our farm. Most
of the info we need can be found there.

> 3. What level of effort was required to integrate memcached into the  
> application?

Minimal - we use ADODB in PHP, which includes query caching via memcache
out of the box, and we have our own caching framework that uses memcache
as its backend. If you're caching anyway, it should be reasonably simple
to use memcache as a backend instead or in addition to your current

> 4. What was the support overhead from a time and expertise standpoint  
> to maintain this?

After setup, support has been minimal - we've only had downtime when
we've been upgrading the software. It's pretty stable.

> 5. Are there any issues or problems in integrating and deploying the  
> cache that are non-obvious or particularly time consuming?

In our case, not really. It really depends on your current caching
codebase. The only problem is the (current) lack of a consistent hashing
algorithm [1] but YMMV.

> 7. Are there any hardware requirements for the cache servers or  
> specific hardware that perform much better in a highly loaded  
> environment? (Perhaps specific NICs that do better then others)

There are people on this list with far bigger farms than us - check
their replies instead :D

> Thanks!
> -Jason

Hope that helps, or at least reassures you that implementation should be



Pay attention to "With default clients adding or removing servers will
invalidate all of your cache!"

Rob Sharp
Development Lead 

telephone: 02 9282 4038
facsimile: 02 9282 4099
skype: qu4nnum

Sound Alliance 
inthemix : FasterLouder : Thought By Them : SameSame

100% recycled electrons were used for the composition of this email 
- please don't print it unless you need to!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20071022/6a976976/attachment.html

More information about the memcached mailing list