> I was watching a Memcached video spoken by John Adams when I heard
> something that made me curious.  When one gets stats from memcached,
> does it really perform a global lock? Does anyone have any good test
> cases on what sort of impact there is with an increasing node size
> with respect to performance degradation?

'stats sizes' grabs a global lock and iterates the whole cache. we don't
recommend you run that one. All other stats commands are extremely fast.

> I am looking to do some research on expanding our product to support
> real-time monitoring, management, and analysis of memcached. But I'm a
> little concerned that this lock occurs during every stat collection,
> so much to the point that John Adams mentions that it can noticeably
> degrade the performance of memcached. I tried to do some research on
> my own but am finding very little performance analysis or any
> benchmark info with respect to constant polling (minimally 30 sec
> interval) of a enterprise-level memcached distributed system. Has
> anyone seen bad performance with respect to a large cluster and
> gathering stats? Any info would be great, thanks!

There is no major lock every stat collection. There's a minor lock and
reading the values is very fast.

A while ago twitter was running an extremely old version of memcached and
they took a long time to upgrade. That particular version had a bug in
stats collection that was *missing* a mutex lock, and would thus crash
sometimes. So they were afraid of running stats commands. That bug hasn't
existed for three years at least.

-Dormando

Reply via email to