Updating Memcached on Ubuntu Jaunty
Credit to the Ubuntu people for resolving this issue already – since memcached 1.2.8 is currently pencilled in for Karmic Koala release of Ubuntu later this year – but I can’t wait that long so I updated my own memcached, it was pretty easy so here are the steps in case anyone else wants to do the same.
- download memcached from http://www.danga.com/memcached/download.bml
- check you have the dependencies you need. The only thing I didn’t have was the libraries for libevent, which you can install through aptitude with aptitude install libevent-dev
- compile as you usually would: configure/make/make install
The final step is to get memcached running – I actually did aptitude remove memcached to get rid of my old version and stop myself from being confused later. Then to start it from command line I used:
/usr/local/bin/memcached -m 64 -p 11211 -u nobody -l 0.0.0.0
The above worked for me and allowed me to use the functionality available in the newer library (specifically I was looking to use the cas (compare and swap) functionality in the new PHP memcached extension) – it probably works on other distros too but I didn’t test it, if it works for you or if you have anything to add then please leave a comment!
I’ve also heard complaints that the Jaunty bundled memcached is compiled as single-threaded.
I’ve complained about Ubuntu’s memcached packages before in their bug system, but didn’t get much traction. One of the many reasons I don’t use Ubuntu anymore.
Fedora 11 memcached is version 1.2.8, yay! :)
Did you have a chance to go to Andre’s all the little pieces talk at DPC? I learned a lot about memcache’s slabs, storage bits, multipliers and such there, so I think I’m in a way better position to configure it properly.
LinuxJedi: I am not using it in production so haven’t run into those issues (yet), thanks for the update though.
Paul: I didn’t see that talk, sounsd like I missed out. Since I don’t run production platforms for a living these days, I don’t have much need to work with memcache in anger, but I’d be very interested to know how you get on with it.