curr_items never decreases

Stephen Woodbridge woodbri at
Thu May 18 18:02:51 UTC 2006

Right, this is important to understand if the cache is large enough. If 
my business rules say the cache items should be available for 7 days, I 
need to know if I am pushing items out of the cache before that time. So 
some stats on the number of items bumped out of the cache before they 
expired and the average number of sec before they expired. These stats 
should ignore items that have no expiry or just could the number of 
items with no expiry that are purged.

This would give me a good indication of how right sized the cache is and 
how much I might need to add to it to bring it back in line with the 
business rules.


john allspaw wrote:
> and what would be useful in these stats, related to this thread, is the age of the oldest object in the cache,
> which I've asked about before.   anyone come up with a way to add this to the stats ?
> -john
> ----- Original Message ----
> From: Brian Moon <brianm at>
> To: Stephen Woodbridge <woodbri at>
> Cc: memcached at
> Sent: Thursday, May 18, 2006 7:50:30 AM
> Subject: Re: curr_items never decreases
>>What is the best way to get hit/miss stats? Are these stored in the 
>>server and retrievable through the stats interface? We use the Perl API.
> Yes, they are available in the stats interface.  I use the PHP/PECL API, 
> so I am not sure how the Perl API returns that.  Here is a telnet 
> session that shows the data:
> $ telnet 11211
> Trying
> Connected to
> Escape character is '^]'.
> stats
> STAT pid 7949
> STAT uptime 4521905
> STAT time 1147963848
> STAT version 1.1.12
> STAT rusage_user 1505.176178
> STAT rusage_system 3408.329855
> STAT curr_items 92413
> STAT total_items 14054351
> STAT bytes 41228832
> STAT curr_connections 281
> STAT total_connections 5101393
> STAT connection_structures 692
> STAT cmd_get 85868835
> STAT cmd_set 14054351
> STAT get_hits 84870042
> STAT get_misses 998793
> STAT bytes_read 8141304030
> STAT bytes_written 769333592842
> STAT limit_maxbytes 67108864

More information about the memcached mailing list