Scaling out memcached

Brad Fitzpatrick brad at danga.com
Wed May 25 00:52:06 PDT 2005


On Wed, 25 May 2005, Batara Kesuma wrote:

> Hi,
>
> I have been using memcached for a few months, and very happy with its
> performance. Recently I just added some more mod_perl machines, we now
> have about 25 mod_perl, with each server running 50 processes. I just
> realized that memcached server has 1024 max connection limit, and I just
> bumped into this limit.
>
> Adding more memcached server is useless because each memcached server
> has to hold persistent connections with all mod_perl servers x
> processes.  It means that each memcached server has to hold 25 x 50 =
> 1250 connections.
>
> Is it better to set higher value (say 2048) for max connection, or is it
> better to stop using persistent connection? Is it possible to use normal
> connection instead of persistent connection? What about the cost
> penalty?

If you're using modern FreeBSD or modern Linux (Linux 2.6), you can have
tens of thousands of persistent connections per process without a sweat.

Don't disable persistent connections.

- Brad



More information about the memcached mailing list