Which way is better for running memcached?

Travis Boucher tbone at nexopia.com
Fri Feb 16 04:10:53 UTC 2007


Jm lists wrote:
>>
>> 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.
>
> Steve,sorry I can't understand the words above.
> Can you kindly help give a more detailed description?
> Thanks again.
Instead of sending 2 get requests, one to each instance, you can send a 
single get for both keys.

Personally we use multiple instances on single machines for a few reasons:
    1. We have 5GB instances, which is hard to deal with on 32bit 
machines, so we split them into 2.5GB instances each.
    2. Multi CPU
    3. We have a second set of smaller memcached instances for larger 
instances (full page caching).  This helps the slab allocator so it 
doesn't have to maintain so many different sets of sizes.

However, for simple setups, fewer instances can be better since you can 
bundle requests for multi keys in few requests (and less latency).




More information about the memcached mailing list