Memcached 1.4.11 RPMs pada CentOS 5.7.

  • Setup RPM Build environment dan beberapa dependencies :
sudo yum -y install rpmdevtools libevent-devel rpmdev-setuptree
  • Ambil dan tempatkan source dan spec file:
wget http://memcached.googlecode.com/files/memcached-1.4.11.tar.gz \ -O ~/rpmbuild/SOURCES/memcached-1.4.11.tar.gz
wget https://raw.github.com/nmilford/specfiles/master/memcached-1.4/memcached-1.4.spec \ -O ~/rpmbuild/SPECS/memcached-1.4.spec
  • Membuat RPM:
rpmbuild -bb ~/rpmbuild/SPECS/memcached-1.4.spec
  • Lalu lakukanlah penginstalan memcached:
sudo rpm -Uvh ~/rpmbuild/RPMS/x86_64/memcached-1.4.11-1.x86_64.rpm
  • Install libevent.
sudo yum -y install libevent

Lalu lakukan setting cache size dan yang lainnya di dalam /etc/sysconfig/memcached, tapi terutama harus meng-enable slab manipulation option.

di dalam OPTIONS environment variable tambahkan

-o slab_reassign

untuk manual adjustment dan

-o slab_reassign,slab_automove

jika akan mencoba Algoritma memory reassignment otomatis.

Nah… sekarang silahkan mencobanya dengan!

sudo /etc/init.d/memcached start
  • lakukan verifikasi jika sudah up :
echo stats | nc localhost 11211
  • Untuk melihat informasi slab :
 echo stats | nc localhost 11211 | grep slab 
  • Membuat algorithma otomatis untuk ON atau OFF :
echo "slabs automove 0" | nc localhost 11211 

Selamat mencoba …………..

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

%d bloggers like this: