Hey.

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:

stats.evictions++;

to items.c:437 after the

stats.curr_items -= 1;

line.

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 Pronto.com
Email: [EMAIL PROTECTED]  (Please send any work requests to: [EMAIL PROTECTED])
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 <[EMAIL PROTECTED]>
To: [email protected]
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/memcached1.pid

- Steve


Reply via email to