curr_items never decreases

Just Marc marc at corky.net
Thu May 18 15:31:26 UTC 2006


Hi Brian,
> Just Marc wrote:
>> Hello,
>>
>> I'm using memcached 1.1.12 from Debian unstable, and it seems that 
>> even though items do expire (verified by seeing that they are no 
>> longer available after the timeout via mc_get), curr_items doesn't 
>> decrease, ever.
>
> To make memcached a fast beast, it does lazy clean up (not sure of the 
> proper term).  That means, things are not removed just because they 
> expire.  They stay in the cache.  If asked for however, and they are 
> expired, they are not returned.  This makes for a much simpler, and 
> faster cache system.
>
Definitely performance oriented but, if the counter exists and means 
nothing, then there's no reason to keep it.
> IMO, the key metrics to watch when deciding if the cache is effective 
> is the hits and misses.  We have a hit/miss ratio of about 900:1.  
> After a while, you learn not to worry about the number of items, size, 
> etc.  As long as you have a good hit/miss ratio things are working 
> well for you.
>
That is true, basically that's all we need to worry about, I stumbled 
upon it by accident and it just looked unhealthy.
> And, before you wonder, no, there is no current way to get a count of 
> unexpired items from the cache.
>
There shouldn't be a significant performance penalty for keeping this 
value properly up to date though...

Marc


More information about the memcached mailing list