What hit ratio should I expect

alex at owal.co.uk alex at owal.co.uk
Wed Apr 2 13:27:55 UTC 2008


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