Hello,

I'm running a Debian Lenny installation, and thus running Memcached
1.2.2. If the statistics that I'm seeing via the tool from
http://livebookmark.net/journal/2008/05/21/memcachephp-stats-like-apcphp/
are to be believed, then it appears that my queries are getting
refreshed every time a get is called (ie, the "Age" statistic returns
to 0 minutes with each get("QueryName") call). Is this normal
behavior?

A stat dump:
STAT pid 28382
STAT uptime 71174
STAT time 1300154240
STAT version 1.2.2
STAT pointer_size 64
STAT rusage_user 11.485253
STAT rusage_system 53.794821
STAT curr_items 4
STAT total_items 4
STAT bytes 111793
STAT curr_connections 9
STAT total_connections 605498
STAT connection_structures 55
STAT cmd_get 173965
STAT cmd_set 4
STAT get_hits 173961
STAT get_misses 4
STAT evictions 0
STAT bytes_read 3599661
STAT bytes_written 8642675377
STAT limit_maxbytes 536870912
STAT threads 1

So it's written 8GB of data in 20 hours, though it's only using a
little over 100KB of the memory I've dedicated to it?

I use the following PHP as a test:
$lol = new Memcache; // Also tried new Memcache() due to different
documentation, same result
$lol->connect("localhost", 11211);
$res = $lol->get("TestQuery");
print_r($res);

The results are shown as expected via the print_r(). But, each time
that script executes, the "Age" statistic for TestQuery I'm seeing
from the memcache.php utility says 0 minutes again.

Have I misconfigured something, or is this how Memcached is supposed
to behave, rewriting the data every time it's accessed and resetting
the age of the data. I'm just not sure what I should be looking for,
but having that many bytes written doesn't seem right to me.

Thank you,
Stephen

Reply via email to