Search This Blog

Friday, June 15, 2012

Installing Memcached with libevent and benchmarking it with memslap

Memcached is "Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load." Memcached is used by most of the companies today including Facebook, Craiglist, Flickr and Twitter. This is one of the thing which I worked on during my summer intern. I am just going to mention the steps for installing memcached and the problems which I faced doing it.

Installation:
1) Download libevent from  http://libevent.org/ . This is one of the dependency for installing memcached.

2) Extract it

3) Go inside extracted directory and type following things
#./configure --prefix=/usr/local
(If you don't put --prefix then chances are that later on while installing memcached it might give problems.)


# make && make install

4) Download source code of memcached from http://www.memcached.org/

5) Extract it

6) Go inside the extracted directory.
#./configure --libevent-with=/usr/local
# make && make install

7) You can check whether memcached is working by giving following command
# memcached -u nobody &
After that you can do 
# ps -el | grep memcached
to see if memcached is started.

8)Now its time to install memslap which is client for memcached. Its used for benchmarking purpose.

9) Download couchbase from http://www.couchbase.com/

10) Extract it and go inside libmemcached directory present in it.

11) Then build libmemcached.

# ./configure
# make

12) Now go inside clients directory present inside libmemcached and give following command
# ./memslap -s server_ip
to start benchmarking process. After some time (600s) you will get some output. You can vary parameters as per documentation of memslap.

2 comments:

anuprathi321@gmail.com said...

In step#6 it should be "--with-libevent" instead of "libevent-with"

Amazing Quotes said...

very amazing and interesting post, thank you for sharing
Great Quotes
Positive Life Quotes
Fitness Quotes - Best Quotes
Future Quotes - Success Quotes
Image Bank - Smile Quotes - Xyore
اقوال وحكم