Which way is better for running memcached?

Steven Grimm sgrimm at facebook.com
Fri Feb 16 03:12:16 UTC 2007


Memcached is very fast. If you only have 2GB of data you want to cache, 
chances are you will never be blocking waiting for memcached (beyond the 
network round-trip time to the memcached server, of course.) Our 
production memcached instances each typically service over 30,000 
requests a second and don't come close to overloading the machines 
they're running on.

The second way is almost certainly better because you will be able to 
bundle more keys together in a "get" request when you want multiple 
pieces of data. Requesting two keys in one "get" request is *much* more 
efficient than requesting one key in each of two requests. The more 
memcached instances you have to spread your load across, the less chance 
that any two keys you request will live on the same server.

-Steve


Jm lists wrote:
> Hello lists,
>
> I have the host which would run memcached.It has 3G memory totally and
> I would like to run memcached with 2G memory.Which is the more
> effective way below?
>
> the first way:
>
> ./memcached -d -m 1024 -l 192.168.1.102 -p 1230
> ./memcached -d -m 1024 -l 192.168.1.102 -p 1231
>
> the second way:
>
> ./memcached -d -m 2048 -l 192.168.1.102 -p 1230
>
>
> I want to know,would the first way decrease the chance of blocking for
> socket connection?
>
> Thanks!



More information about the memcached mailing list