Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm curious about how people deploy memcached on 64 bit machines. Do you compile a 64bit (standard) memcached binary and run that, or do people compile it in 32bit mode and run N instances (where N = machine_RAM / 4GB)?

Consider a recommended deployment of Redis (from the Redis FAQ):

Redis uses a lot more memory when compiled for 64 bit target, especially if the
dataset is composed of many small keys and values. Such a database will, for
instance, consume 50 MB of RAM when compiled for the 32 bit target, and 80 MB
for 64 bit! That's a big difference. You can run 32 bit Redis binaries in a 64
bit Linux and Mac OS X system without problems. For OS X just use make 32bit.
For Linux instead, make sure you have libc6-dev-i386 installed, then use make
32bit if you are using the latest Git version. Instead for Redis <= 1.2.2 you
have to edit the Makefile and replace "-arch i386" with "-m32".  If your
application is already able to perform application-level sharding, it is very
advisable to run N instances of Redis 32bit against a big 64 bit Redis box
(with more than 4GB of RAM) instead than a single 64 bit instance, as this is
much more memory efficient.

Would not the same recommendation also apply to a memcached cluster?

share|improve this question
add comment

1 Answer

the key is how many machines do you have available. if you have one or two makes sense to use 64 bits. also you need to consider that memcache out of the box doesn't run into a cluster but independent. so the scenario of one big box will appply very well.

if you run a cluster of memcache it makes sense to go with the 32 bits and more instances per box.

i have 64 bits into a cluster and I don't see much difference from 32 bits just uses a bit more memory.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.