Reputation: 423
I am seeing evictions when the memcached is only 40% full. How is that possible?
Upvotes: 8
Views: 13846
Reputation: 5962
I wrote up a long explanation to this question which would apply equally to this as well.
Upvotes: 3
Reputation: 357
Check the slab sizes by running the memcached stats. Looks like your slabs are not evenly populated and that is causing the evictions even when the cache is not full full.
Upvotes: 14
Reputation: 610
Memcached stores data according to slabs of different memory chunks. If the different memory chunks are already allocated, then the Least recently used algorithm runs on the slab and evicts the data out, even if the there are no data in other memory slabs.
Therefore a large distribution of data sizes can be responsible for this problem. By having multiple instances of memcached running and using it as a distributed system, the issue can be reduced.
Upvotes: 1