2011年6月2日木曜日

kyototycoonとmemcache比較太郎その1

kyototycoonとmemcacheでパフォーマンスがどんだけ違うか
気になったので、小手調べに。

kyototycoonはmemcacheのライブラリを使用。
データ領域はCrucialSSD C300 256GB。

mixiさんのブログを参考に、memstormっていうので
やってみたお。

やった内容は
10000回、10240バイトのデータを64バイトのKeyでSETしてレコードを同じ回数だけGETするつうもん。


#kyototycoonの場合(SSD)
./memstorm -s localhost:22222 -n 10000 -k 64 -l 10240
........................................ (1000)
........................................ (2000)
........................................ (3000)
........................................ (4000)
........................................ (5000)
........................................ (6000)
........................................ (7000)
........................................ (8000)
........................................ (9000)
........................................ (10000)

----
Num of Records : 10000
Non-Blocking IO : 0
TCP No-Delay : 0

Successful [SET] : 10000
Failed [SET] : 0
Total Time [SET] : 401.89057s
Average Time [SET] : 0.04019s

Successful [GET] : 10000
Failed [GET] : 0
Total Time [GET] : 1.83100s
Average Time [GET] : 0.00018s
----

#kyototycoon非同期モード
./memstorm -s localhost:22222 -n 10000 -k 64 -l 10240 -b
........................................ (1000)
........................................ (2000)
........................................ (3000)
........................................ (4000)
........................................ (5000)
........................................ (6000)
........................................ (7000)
........................................ (8000)
........................................ (9000)
........................................ (10000)

----
Num of Records : 10000
Non-Blocking IO : 1
TCP No-Delay : 0

Successful [SET] : 10000
Failed [SET] : 0
Total Time [SET] : 1.04116s
Average Time [SET] : 0.00010s

Successful [GET] : 10000
Failed [GET] : 0
Total Time [GET] : 394.99975s
Average Time [GET] : 0.03950s

#memcacheの場合
./memstorm -s localhost:11211 -n 10000 -k 64 -l 10240
........................................ (1000)
........................................ (2000)
........................................ (3000)
........................................ (4000)
........................................ (5000)
........................................ (6000)
........................................ (7000)
........................................ (8000)
........................................ (9000)
........................................ (10000)

----
Num of Records : 10000
Non-Blocking IO : 0
TCP No-Delay : 0

Successful [SET] : 10000
Failed [SET] : 0
Total Time [SET] : 394.82144s
Average Time [SET] : 0.03948s

Successful [GET] : 10000
Failed [GET] : 0
Total Time [GET] : 1.83289s
Average Time [GET] : 0.00018s
----

#非同期モード
./memstorm -s localhost:11211 -n 10000 -k 64 -l 10240 -b
........................................ (1000)
........................................ (2000)
........................................ (3000)
........................................ (4000)
........................................ (5000)
........................................ (6000)
........................................ (7000)
........................................ (8000)
........................................ (9000)
........................................ (10000)

----
Num of Records : 10000
Non-Blocking IO : 1
TCP No-Delay : 0

Successful [SET] : 10000
Failed [SET] : 0
Total Time [SET] : 1.03816s
Average Time [SET] : 0.00010s

Successful [GET] : 10000
Failed [GET] : 0
Total Time [GET] : 394.95381s
Average Time [GET] : 0.03950s
----


ちょっとどういう仕組みでツールが動いているかは不明だけど・・・
非同期モードだと、GETのパフォーマンスが落ちるね。

memcacheのほうが当然早いのだけれど、tycoonも悪くない。
が、もっと差がでると思ってたので、テストミスった太郎かこれ。

引き続きやるおー。

0 件のコメント: