<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Saul Rotblatt wrote:
<blockquote cite="mid003201c64c91$6bba05c0$bc01a8c0@20051229hi501"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator" content="Microsoft Word 11 (filtered medium)">
  <style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
  </style>
  <div class="Section1">
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;">I am getting the stats
from memcache but have not found any
documentation that explains the data that comes back.&nbsp; Can someone
enlighten me
on the following and what values I should expect:<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;"><o:p>&nbsp;</o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;">rusage_system<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;">rusage_user<o:p></o:p></span></font></p>
  </div>
</blockquote>
I am also interested in any explanation of any of the stats. I graph
them in Cacti (see <a class="moz-txt-link-freetext" href="http://www.faemalia.net/mysqlUtils/">http://www.faemalia.net/mysqlUtils/</a> if you also want
to graph them in Cacti), but a few of the values confuse me. It's one
of:<br>
<ol>
  <li>they don't match up with reality</li>
  <li>the values don't change like I expect them to</li>
  <li>my usage of memcached isn't what I actually expected.</li>
</ol>
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.<br>
<br>
Here's a quick set of statistics from one of my MemcacheD servers:<br>
<br>
<code>:) php ./dumpMemcachedStats.php &lt;ipAddr&gt;<br>
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<br>
</code><br>
Then a bit later from the same server:<br>
<br>
<code>:) php ./dumpMemcachedStats.php &lt;ipAddr&gt;<br>
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 <br>
</code><br>
The difference between "bytes" the first and second time?<br>
<br>
<code>:) echo $[ 78411656 - 78403082 ]<br>
8574<br>
</code><br>
The difference between bytes written?<br>
<br>
<code>:) echo $[ 93216013660 - 92889358579 ]<br>
326655081<br>
</code><br>
So I'm really not sure what to make of "bytes" or "bytes_written" --
they seem to share little relationship.<br>
<br>
--<br>
timeless<br>
<br>
</body>
</html>