What hit ratio should I expect

Olga Khenkin olga at metacafe.com
Wed Apr 2 14:58:54 UTC 2008


Hi Alex,

Try to get memcached stats before and after "get" and "set" commands,
and check whether both commands are shown on the stats. If there's no
such command in Perl memcached client, just telnet the memcached server
and type "stats".

Regards,
Olga.

-----Original Message-----
From: memcached-bounces at lists.danga.com
[mailto:memcached-bounces at lists.danga.com] On Behalf Of alex at owal.co.uk
Sent: Wednesday, April 02, 2008 4:28 PM
To: memcached at lists.danga.com
Subject: What hit ratio should I expect

I'm helping a colleague who is trying out memcached with perl. I've been
raving to him about it for ages so I am duty bound to help him :-)

He has a memcached server sitting on one box and two perl clients
sitting
on other boxes.

One script saves five things with different keys, and the memcached
verbose log says that it is "STORED".

The other script tries to get all five records but doesnt get them all.
It
seems that the cache is reporting misses.

So my problem is why have those records been reported as stored if they
cant be retrieved. I know that this is a cache - so records are not
guaranteed to be kept - but we are losing over half the things we store.

Guess 1) There is a timeout. All five records were "set" with the same
large timeout of 12 hours.
Guess 2) The cache is filling up. But we set it to 3Gb and this is the
only data in the cache.
Guess 3) The keys are being hashed to be stored on a different server.
But
we only have the one server right now.


Can you suggest what else I might need to test or what other things I
need
to read, or info I need to supply?

Thanks

Alex



More information about the memcached mailing list