Expiration Behavior

Timo Ewalds timo at tzc.com
Tue May 8 17:54:56 UTC 2007

As a point of interest, a reaper command could be useful. It is not 
something we would ever run while our site is live, but, if we're taking 
the site down to do a code update, and likely flushing or restarting 
memcache anyway, the time it takes to run wouldn't matter, and it would 
be a great way to see how much memcache space we really need. We're 
getting a 95% hit rate with our 30gb, but, would 10gb be enough? With 
the latest version we will be able to tell if we're getting any 
evictions, but that just tells us if we don't have enough space, not if 
we've got way too much.


Gavin M. Roy wrote:
> Hello,
> Am running memcached in production on a fairly large site and am 
> noticing that while I'm putting in expirations, the size of the 
> utilization is growing disproportionately with the expected growth of 
> the cache based upon what we implemented it for.  By some testing, it 
> seems that items that are expired from the cache are only removed when 
> the get request is sent.  Is our interpretation of this behavior 
> correct, or does content in the cache expire based upon the timestamp 
> through some internal stack?  If it's the later how often does the 
> daemon run through to get rid of expired content?
> TIA,
> Gavin

More information about the memcached mailing list