bytes > limit_maxbytes and no evictions?

Steve Webb swebb at
Mon Jun 25 16:08:50 UTC 2007


So I checked out the code and "evictions" is only incremented when the 
data times out, which to me is not obvious.

I changed the code to increment evictions when the cache is full and an 
item is "pushed" out.

Just add the line:


to items.c:437 after the

stats.curr_items -= 1;


Can someone with svn access please add this to the source tree?  I don't 
have svn access and I need to be able to monitor this statistic and I'm 
guessing that others will also find this statistic interesting.  We use it 
mainly to "tune" the size of a memcached server.  A ton of evictions means 
that we need to increase the size of the server.  Also, we chart this 
statistic, so a spike could signal a problem.

- Steve

Steve Webb - Lead System Administrator for
Email: swebb at  (Please send any work requests to: rt at
Cell: 303-564-4269, Office: 303-497-9367
YIM: scumola

On Sun, 24 Jun 2007, Steve Webb wrote:

> Date: Sun, 24 Jun 2007 15:15:37 -0600 (MDT)
> From: Steve Webb <swebb at>
> To: memcached at
> Subject: Re: bytes > limit_maxbytes and no evictions?
> I still haven't gotten a response to my question.  I'm not running with the 
> '-M' flag as another user has also asked about this type of issue. Here are 
> the flags that I'm using:
> /usr/local/bin/memcached -d -p 11111 -u nobody -c 1024 -m 1024 -P 
> /tmp/
> - Steve

More information about the memcached mailing list