Hi, When memcached uses all allocated memory, it starts to delete old objects, which may not be expired yet. It deletes the least recently used object from the slab (bucket). These deletes are called 'evictions'.
You can see the number of evictions in memcached 'stats' command. You can also use two other commands: 'stats slabs' and 'stats items', which will give you usage info per bucket. Olga. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of tcbarrett Sent: Monday, April 20, 2009 2:08 PM To: memcached Subject: Measuring Memory Usage Hi I searched the group for 'measuring memory usage' with no hits. I am trying to determine how much memory my cached data is using. I have some large data blocks that are not caching properly[1]. I am assuming that is due to there being a smaller numer of large 'buckets' and I have used all mine up? I am in the process of breaking it down into more sensible chunks (e.g. one data hash has 1000s of subkeys that I can make into cache hits on their own). However I would ideally like to know how much memory I am using as I have absolutely no idea if I am near the saturation point of allocated memory or not. I feel a bit dumb as this seems to be either a) common problem and I am incapable of finding the answer myself or b) a stupid problem that nobody ever thought someone would get into. This is running on a linux box (a few flavours), using perl. [1] By this I mean that sometimes, after a period of time, the cache retrieval is empty (before expiry). Basically I don't know why. Could it be some other application eating the memory? Or is it other large keys being set, pushing it out? Or am I using up all the allocated memory?
