So, instead of patching, answer me this.  :)

"Evictions" = if an item was removed and set with a TTL of > now(), right?

If an item was set without a TTL, evictions is not incremented because we can calculate that? (total_items - curr_items - evictions)

If so, then ignore my "patch" in the last email.  :)

- 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 Mon, 25 Jun 2007, Steve Webb wrote:

Date: Mon, 25 Jun 2007 10:08:50 -0600 (MDT)
From: Steve Webb <[EMAIL PROTECTED]>
To: [email protected]
Subject: Re: bytes > limit_maxbytes and no evictions?

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


Reply via email to