Bu Blogda Ara

22 Aralık 2010 Çarşamba

Memcached Performance Tests and Source Code (Java Source, Ant Project)

What is Memcached?

I have prepared some test cases in order to test the performance of Memcached distributed caching library. You can get them from my code repository with the following mercurial script.


hg clone https://barisergunexperimentalstuff.googlecode.com/hg/ barisergunexperimentalstuff


For your information if you don't have a mercurial rep client than you can get it with your favorite package manager. I use "sudo apt-get install tortoisehg" on my Ubuntu.

A-) Local tests:

Local tests are done with a sample DataObject. when you run the tests 8 different memcached instances are started on 8 consequent ports.

Steps to follow

- Install memcached (eg. sudo apt-get install memcached). On my previous post I also have information about on installing memcached on Centos 5.5

- Then, run tests with below ant script


ant local.test -Dentry.count=10000 -Dttl=60


Dentry.count is used to configure number of objects to cache. Dttl is used to configure TTL for each object in the cache.

A-) Distributed tests:

Local tests automatically starts and terminates the memcached servers on local machine. For distributed tests you will have to start the memcached servers on remote machines and give the server_ip:server_port combinations with a specific format as shown below.

Steps to follow:

- Install memcached on remote servers

- Start memcached servers.

Eg:


memcached -d -u root -m 1024 10.34.3.13 -p 1121


- Run distributed tests with following arguments(just a sample)

ant distributed.test -Dentry.count=10000 -Dget.timeout=10 -Dttl=300 -Dservers="10.34.3.11:1121 10.34.3.12:1121 10.34.3.13:1121"

Dget.timeout is for timeout for reading from cache
Dservers is list of memcached servers.

Hiç yorum yok:

Yorum Gönder