In fact, with default settings, memcached allocate by page of ~1 MB (exact page size is the nearest multiple of chunk size). Each time a page is full (i.e. no free chunk), if allocated memory does not reach the memory limit, another page is allocated for this chunk size.
So if you allocate a lot of small chunks for small items, and they are evicted, the memory cannot be reused for bigger chunks. The only solution is to restart memcached, a flush will not help. There is a mode that always allocate 1MB pages, which allows to reallocate a page to another chunk size. However, I'm not sure that it is the problem here. Having output of stats and stats slabs will help to diagnose. 2009/5/14 luciano11 <[email protected]>: > > My understanding of the current software is that an individual memory > bucket will grow in size as needed as long as there is free memory, > but that growth of one memory bucket cannot cause another bucket to > evict data. > > So is it possible that the cache is partially filled by another memory > bucket that has data with no expiration? > > > On May 14, 9:38 am, Dustin <[email protected]> wrote: >> On May 14, 2:37 am, TopLess <[email protected]> wrote: >> >> > Hi Colin, >> >> > thx for your answer. >> > This is our configuration : >> > # memory >> > -m 10000 >> >> > In fact, each server had 16 GB and only 3 GB is reserved by system, so >> > there is no problem concerning the free memory. >> > So we don't reach max memory usage, but memcached items stays strictly >> > constant. >> > An idea ? >> >> That does seem odd. The output of "stats" and "stats items" and >> "stats slabs" would help. >> >> What expiration are you setting for these items? What version of >> memcached (stats will include that).
