Frage

We're using a fairly large (20GB), very active (>92% hit rate) Memcache cluster and seeing more than 10% wasted space.

The eviction rate is extremely low (0.1/sec), and the reclaimed rate is flat - 0.

Is this cause for concern, and is there anything that can be done - even periodically - to ensure that is doesn't eat as much usable space as it currently is?

War es hilfreich?

Lösung

I recently did an analysis of the space usage of our memcached cluster which is about twice that size.

We found that memcached would typically have "waste" space when it had empty chucks in slabs of various sizes that were simply not filled.

This seems to be a side affect of the fact that slab allocation in memcached < 1.4.11 is static and memory for a certain slab size is only evicted (once allocated) from slabs of the same size.

http://code.google.com/p/memcached/wiki/ReleaseNotes1411

As of 1.4.11 a feature of slab reallocation was introduced, which is supposedly meant to allow the LRU to evict objects from other slabs classes to use on a needed slab class.

I'm not sure what would happen if the eviction rate was such that memory was constantly being evicted and reallocated to and from different slab classes.

Given the low eviction rate however, I would not be overly concerned unless you are experiencing performance problems else where.

Hopefully that helps.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top