Adding more configurations in CentOS memcached

Standard

Recently been working a lot of memcached stuff. I have set up a 4 node MCRouter cluster on AWS (Screw Elasticache, when you encounter hot keys that reads the value for 2000 request per second, it slows down your system a lot).

I encounter a problem. By default memcached has a memcached.conf in etc folder, but if you install in centOS via “yum install memcached”, there is no such file. So how do you add in additional parameters to tweak your memcached?

what you can do there is a file in /etc/sysconfig/memcached. Add your parameters on the last line. For example, if you want additional threads, add OPTIONS=”-t 16″ at the last line and you will get what you want

$ ps -ef | grep memcached
495      10152     1  0 13:19 ?        00:00:00 memcached -d -p 11211 -u memcached -m 64 -c 1024 -P /var/run/memcached/memcached.pid -t 16
webapp   10200  9483  0 13:29 pts/0    00:00:00 grep memcached
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s