memcacche stats

timeless time at
Tue Mar 21 05:12:12 UTC 2006

Saul Rotblatt wrote:

> I am getting the stats from memcache but have not found any 
> documentation that explains the data that comes back.  Can someone 
> enlighten me on the following and what values I should expect:
> rusage_system
> rusage_user
I am also interested in any explanation of any of the stats. I graph 
them in Cacti (see if you also want 
to graph them in Cacti), but a few of the values confuse me. It's one of:

   1. they don't match up with reality
   2. the values don't change like I expect them to
   3. my usage of memcached isn't what I actually expected.

For example, the "bytes" value seems pretty clear cut: it should be the 
number of bytes that MemcacheD daemon is using, which should be a gauge, 
right? But I need to treat it as a counter ("derive" actually, to be 
exact) to see any values. Either that means my MemcacheD daemon is using 
more and more bytes (without bound?) or I'm misunderstanding what that 
value means. It seems conceivable that it's the former (since the 
current value is ~78MB and my total daemon size is 512), but I just 
cannot be sure.

Here's a quick set of statistics from one of my MemcacheD servers:

|:) php ./dumpMemcachedStats.php <ipAddr>
pid:18332 uptime:2185962 version:1.1.12 rusage_user:1291558 
rusage_system:3818460 curr_items:152668 total_items:3186926 
bytes:78403082 curr_connections:511 total_connections:862205 
connection_structures:901 cmd_get:16559904 cmd_set:3186926 
get_hits:14238069 get_misses:2321835 bytes_read:17901613053 
bytes_written:92889358579 limit_maxbytes:536870912
Then a bit later from the same server:

|:) php ./dumpMemcachedStats.php <ipAddr>
pid:18332 uptime:2186450 version:1.1.12 rusage_user:1291825 
rusage_system:3819643 curr_items:152770 total_items:3188171 
bytes:78411656 curr_connections:472 total_connections:862540 
connection_structures:901 cmd_get:16574035 cmd_set:3188171 
get_hits:14251097 get_misses:2322938 bytes_read:17906963662 
bytes_written:93216013660 limit_maxbytes:536870912
The difference between "bytes" the first and second time?

|:) echo $[ 78411656 - 78403082 ]
The difference between bytes written?

|:) echo $[ 93216013660 - 92889358579 ]
So I'm really not sure what to make of "bytes" or "bytes_written" -- 
they seem to share little relationship.


-------------- next part --------------
An HTML attachment was scrubbed...

More information about the memcached mailing list