Some question abt memcached

Paul Querna chip at corelands.com
Thu Dec 7 18:06:02 UTC 2006


howard chen wrote:
> 1. If a variable, say a string, with 1KB in size, is to be stored in
> memcached, how many actual memory will be used?

It uses a slab allocation, so it depends on where what size your slabs
are.  In older versions, they were power of two(64, 128, 256...), so you
could expect some large amounts of waste, but this is no longer the case
in 1.2+.

> 2. If the server used up all its memory, is that memcached will swap
> base on the LRU algorithm? (Lease recently used, i.e. least recently
> get)?

Yes, its an LRU.

-Paul


More information about the memcached mailing list