How to know how much  memory an Memcached instance is utilized and
how much is free?

This is a common question on this list.  However, the truth is, it
doesn't matter nearly as much as some other things. Set your memory to what you can afford the system to lose and then worry about some other stats.

What does matter is your hit/miss ratio and evictions. You want a high ratio of hits to misses and you want as few evictions as you can get. All of these variables may be different depending on
your application.

STAT get_hits 56695365
STAT get_misses 8870530

So, on this server, my ratio is about 6:1.  I am fine with that for this
application.  This cache is in place for just 5 minutes. It is there to
protect against a rush of traffic, not to keep us up and running in normal situations. Your acceptable value may be higher or lower. It all depends on your application.

If you have a lot of evictions, it means you need more memory.

STAT evictions 0

Same box as above has had no evictions since being restarted 68 days ago
(probably for server maintenance, not memcached issues).  So, we have
plenty of memory for all the slabs to use.


Brian.
--------
http://brian.moonspot.net/

Reply via email to