How to determine a memcached server is OVERLOAD?

Miguel DeAvila miguel.j.deavila at gmail.com
Tue Apr 29 18:16:45 UTC 2008


On Tuesday 29 April 2008 03:48:41 老邪 wrote:
> yah, i have 1.2.5 now. and the stats part showing
> 
> STAT evictions 8719397
> 
> what does it mean though??

It means that valid items are being removed from the cache in order to make room for new items.
See

	http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt

(Search for 'evictions' in the 'General-purpose statistics' section.)

In a perfect world there are 0 evictions, though that's not been the case for me in practice.
You really need to look at the number of evictions in relation to the number of 'set' operations.
If the evictions are a small percentage (< 5%) then you might want to just ignore it.

On the other hand, if you want to reduce the number of evictions then you may want to

 - check your TTLs and see if there are some items that can have a smaller TTL
 - add more memory to your memcache cluster (by allocating more memory to your existing
servers or adding more servers).

Miguel


> 
> On Fri, Apr 25, 2008 at 5:46 AM, dormando <dormando at rydia.net> wrote:
> 
> >
> >
> > You should upgrade to 1.2.5. The version you are running (1.2.0) doesn't
> > support eviction tracking.
> >
> > You need to monitor a few things:
> >
> > 'evictions' - which will happen if all of your items do not have an expire
> > time, _or_ you are storing too many new items and they don't get expired
> > fast enough.
> > - The actual CPU usage on the box. If it's pegged, you're dead.
> > - If you're swapping. Just disable swap or something...
> > - If something else on the box is contending for cpu.
> > - If your network/switch/uplinks are pegged.
> >
> > Otherwise memcached will happily chew up all of your box's resources.
> >
> > -Dormando
> >
> 




More information about the memcached mailing list