slab size configuration

dormando dormando at rydia.net
Wed Feb 20 01:13:35 UTC 2008


Hey,

Unless I have a missunderstanding...

You can tune the multiplier for the slab class to get the classes to be
roughly within your ideal range, if they're not already. You can verify
this via the 'stats slabs' command.

You're probably fine just tuning it to be within close range, but not
necessarily exactly specifying. On startup memcached will allocate at
least one slab per slab class (1MB each). Then new slabs are allocated
out of memory as necessary. So if you have hardly anything in a range of
slab classes, at most you "waste" a few megabytes of memory. Memcached
will allocate more slabs for slab classes which it run out of space.

-Dormando

Sharon Horsewood wrote:
> We are new to memcached.  Is there anyway to explicitly define slab-sizes at a configuration level for memcached?  The items we are caching have 2 major ranges: 32k – 128k and 512K – 756K.  But there would be practically nothing between 128K and 512K.  Can we configure memcached's slab-subsystem this way?  If so, would you please provide us or point us to appropriate documentation?
> 
> Thanks,
> 
> Sharon
> sharonbeth at mindspring.com
> 
> 



More information about the memcached mailing list