Occasional slowness, hitting select_timeout in Cache::Memcached

Brad Fitzpatrick brad at danga.com
Thu Mar 23 16:39:55 UTC 2006


It's hard to say without knowing what else is going on on that machine.
Is it reproducable enough that you can strace the server until it happens?

$ strace -ttt -s 1024 -f memcached.out memcached -u nobody -p 11211

memcached doesn't do anything in the server that'd cause it to block, so
I'm not sure what's happening to you.

- Brad


On Wed, 22 Mar 2006, Alex Greg wrote:

> Hi,
>
> We're using memcached and are generally very happy with it - it's
> serving over 2,500 requests per second on one server (Fedora Core 3,
> 2.6 kernel w/epoll), and we've generally found it to be very fast and
> a great way to offload queries from our database server.
>
> There is only one nagging problem; very occasionally (~0.1% of
> queries), we see the memcache server taking too long to send the data,
> which means the client wait for 1 second (the value of select_timeout
> in Cache::Memcached) before declaring a cache miss and getting the
> data from the database. I've reduced select_timeout to 0.2 secs to
> reduce the impact of this problem, but it still persists (albeit
> taking 0.2 seconds before declaring a cache miss).
>
> What could be causing this occasional slowness? It doesn't seem to be
> on any particular key, and seems to occur completely at random. The
> client and server machines are all running Linux 2.6 with epoll.
>
> Regards,
>
> -- Alex
>
>


More information about the memcached mailing list