memcacche stats

Evan Fribourg evan at
Tue Mar 21 18:12:34 UTC 2006

Here are the stats as far as I understand them:

pid = process id
uptime = number of seconds since the process was started
time = current time
version = memcached version
rusage_user = seconds the cpu has devoted to the process as the user
rusage_system = seconds the cpu has devoted to the process as the system
curr_items = total number of items currently in memcache
total_items = total number of items that have passed through the cache
bytes = total number of bytes currently in use by curr_items
curr_connections = total number of open connections to memcached
connection_structures = ???
cmd_get = total GET commands issued to the server
cmd_set = total SET commands issued to the server
get_hits = total number of times a GET command was able to retrieve and
return data
get_misses = total number of times a GET command was unable to retrieve and
return data
bytes_read = total number of bytes input into the server
bytes_written = total number of bytes written by the server
limit_maxbytes = total storage bytes available to the server.

Kind regards,

Evan Fribourg

-----Original Message-----
From: memcached-bounces at
[mailto:memcached-bounces at] On Behalf Of timeless
Sent: Monday, March 20, 2006 9:12 PM
To: Saul Rotblatt
Cc: memcached at
Subject: Re: memcacche stats

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:




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.


More information about the memcached mailing list