memcached purging and LRU

Sergio Salvatore sergiosalvatore at yahoo.com
Fri Feb 11 14:42:36 PST 2005


Dear All,

I've been busy deploying memcached for our highly
dynamic site--basically employing it as a page-level
cache that's distributed across a cluster of web
servers.  In my initial tests, I seem to be running
into a "SERVER_ERROR out of memory" problem
frequently.  The sizes of the items that I'd like to
add to the cache are generally from 4 to 30 kB with a
heavy concentration on those from 4 to 10 kB.  I
understand with memcached's slab allocator that I may
run out of appropriately sized slabs before my overall
memory is exhausted, but other posts that I've
encountered seem to indicate that there's an LRU
purging method in cases like this.  Is this correct? 
If so, why would you ever get an "out of memory"
problem?

If memcached doesn't have LRU purging, is there a way
to implement this on top of the daemon?  

I know I'm missing something simple here as this seems
to be a problem that lots of people would run into...

My implementation has used a few PHP different
APIs---but the API has not affected this problem.

Thanks in advance for your help...

/sergio


		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 



More information about the memcached mailing list