evictions stat in 1.2.2 [protocol.txt patch included]
BUSTARRET, Jean-francois
jfbustarret at wat.tv
Tue May 29 07:32:06 UTC 2007
As far as I understand the code, refcount is the number of concurrent requests working on an item.
Something from the tail with refcount > 0 is being accessed and will soon be moved to the head of the LRU.
The doc is wrong. Here is what it should say :
diff -rup memcached-1.2.2/doc/protocol.txt memcached-1.2.2-doc/doc/protocol.txt
--- memcached-1.2.2/doc/protocol.txt 2007-04-16 23:02:45.000000000 +0200
+++ memcached-1.2.2-doc/doc/protocol.txt 2007-05-29 09:19:12.000000000 +0200
@@ -352,8 +352,8 @@ get_hits 64u Number of key
found present
get_misses 64u Number of items that have been requested
and not found
-evictions 64u Number of items removed from cache because
- they passed their expiration time
+evictions 64u Number of valid items removed from cache
+ to free memory for new items
bytes_read 64u Total number of bytes read by this server
from network
bytes_written 64u Total number of bytes sent by this server to
Can someone with enough karma apply the patch ?
JFB
-----Message d'origine-----
De : Ben Hartshorne [mailto:memcache at green.hartshorne.net]
Envoyé : mardi 29 mai 2007 01:19
À : BUSTARRET, Jean-francois
Cc : memcached at lists.danga.com
Objet : Re: evictions stat in 1.2.2
On Mon, May 28, 2007 at 05:32:15PM +0200, BUSTARRET, Jean-francois wrote:
>
> The eviction stat only counts "cache overflows" (valid entries bumped
> from the cache by inserts) and not expirations.
>
> What would be the point of counting expirations ?
I agree that I am more interested in cache overflows. However, the docs in 'protocol.txt' included with the tarball describes:
355 evictions 64u Number of items removed from cache because
356 they passed their expiration time
This seems incorrect, both by my reading of the code and your statement above. Unfortunately, I can't quite describe exactly what evictions are because I don't understand the conditions under which an item's refcount can be nonzero (and therefore not bumped to make way for new items).
-ben
--
Ben Hartshorne
email: ben at hartshorne.net
http://ben.hartshorne.net
More information about the memcached
mailing list