Articles Comments

ちからの備忘録的日記 » cloud » OpenStack Swift ベンチマークツール(swift-bench)を使ってみた!

OpenStack Swift ベンチマークツール(swift-bench)を使ってみた!




OpenStack Swift をインストールすると、swift-bench というツールが付属されていたので、試してみました。

尚、実験環境の Unixbench は、以下の記事を参照ください。

» UnixBench on Ubuntu 10.04 LTS@仕事場のPC

swift-bench 使用方法

残念ながらマニュアルに記載がないので、swift-bench -h で確認。

$ swift-bench -h
Usage: swift-bench [OPTIONS] [CONF_FILE]

Conf file with SAIO defaults:

    [bench]
    auth = http://saio:11000/v1.0
    user = test:tester
    key = testing
    concurrency = 10
    object_size = 1
    num_objects = 1000
    num_gets = 10000
    delete = yes


Options:
  -h, --help            show this help message and exit
  --saio                Run benchmark with SAIO defaults
  -A AUTH, --auth=AUTH  URL for obtaining an auth token
  -U USER, --user=USER  User name for obtaining an auth token
  -K KEY, --key=KEY     Key for obtaining an auth token
  -u URL, --url=URL     Storage URL
  -c CONCURRENCY, --concurrency=CONCURRENCY
                        Number of concurrent connections to use
  -s OBJECT_SIZE, --object-size=OBJECT_SIZE
                        Size of objects to PUT (in bytes)
  -n NUM_OBJECTS, --num-objects=NUM_OBJECTS
                        Number of objects to PUT
  -g NUM_GETS, --num-gets=NUM_GETS
                        Number of GET operations to perform
  -x, --no-delete       If set, will not delete the objects created
  

swift-bench 実行スクリプト

以下のベンチテストを自動でやるためのスクリプトを書いてみました。

  • 同時実行数を2から10まであげる
  • 1byte から 1Mbyte まで5段階でサイズを増やす(同時実行は、5固定)
#!/bin/sh

CMD=/usr/local/bin/swift-bench
CONF=/etc/swift/swift-bench.conf

MAX_CONCURRENCY=10
MAX_OBJECT_SIZE=`expr 1024 \* 1024`
INTERVAL=`expr $MAX_OBJECT_SIZE / 5`

for i in $(seq 2 2 $MAX_CONCURRENCY )
do
echo $CMD -c $i $CONF
$CMD -c $i $CONF
done
exit

for i in $(seq 1 $INTERVAL $MAX_OBJECT_SIZE )
do
echo $CMD -s $i $CONF
$CMD -s $i $CONF
done

exit

swift-bench.conf ファイルは、以下の通り。

[bench]
auth = http://ubuntu:8080/auth/v1.0
user = test:tester
key = testing
concurrency = 5
object_size = 1024
num_objects = 100
num_gets = 10
delete = yes

swift-bench 結果

/usr/local/bin/swift-bench -c 2 /etc/swift/swift-bench.conf
swift-bench 2011-06-21 17:42:10,938 INFO 75 PUTS [0 failures], 37.2/s
swift-bench 2011-06-21 17:42:11,594 INFO 100 PUTS **FINAL** [0 failures], 37.4/s
swift-bench 2011-06-21 17:42:11,658 INFO 10 GETS **FINAL** [0 failures], 198.1/s
swift-bench 2011-06-21 17:42:13,560 INFO 100 DEL **FINAL** [0 failures], 52.9/s
/usr/local/bin/swift-bench -c 4 /etc/swift/swift-bench.conf
swift-bench 2011-06-21 17:42:16,549 INFO 81 PUTS [0 failures], 39.8/s
swift-bench 2011-06-21 17:42:16,968 INFO 100 PUTS **FINAL** [0 failures], 40.8/s
swift-bench 2011-06-21 17:42:17,031 INFO 10 GETS **FINAL** [0 failures], 211.8/s
swift-bench 2011-06-21 17:42:18,896 INFO 100 DEL **FINAL** [0 failures], 54.0/s
/usr/local/bin/swift-bench -c 6 /etc/swift/swift-bench.conf
swift-bench 2011-06-21 17:42:21,848 INFO 79 PUTS [0 failures], 39.3/s
swift-bench 2011-06-21 17:42:22,296 INFO 100 PUTS **FINAL** [0 failures], 40.6/s
swift-bench 2011-06-21 17:42:22,360 INFO 10 GETS **FINAL** [0 failures], 193.7/s
swift-bench 2011-06-21 17:42:24,218 INFO 100 DEL **FINAL** [0 failures], 54.2/s
/usr/local/bin/swift-bench -c 8 /etc/swift/swift-bench.conf
swift-bench 2011-06-21 17:42:27,186 INFO 79 PUTS [0 failures], 39.2/s
swift-bench 2011-06-21 17:42:27,595 INFO 100 PUTS **FINAL** [0 failures], 41.3/s
swift-bench 2011-06-21 17:42:27,658 INFO 10 GETS **FINAL** [0 failures], 194.0/s
swift-bench 2011-06-21 17:42:29,536 INFO 100 DEL **FINAL** [0 failures], 53.6/s
/usr/local/bin/swift-bench -c 10 /etc/swift/swift-bench.conf
swift-bench 2011-06-21 17:42:32,500 INFO 78 PUTS [0 failures], 38.7/s
swift-bench 2011-06-21 17:42:32,916 INFO 100 PUTS **FINAL** [0 failures], 41.1/s
swift-bench 2011-06-21 17:42:32,985 INFO 10 GETS **FINAL** [0 failures], 185.6/s
swift-bench 2011-06-21 17:42:34,873 INFO 100 DEL **FINAL** [0 failures], 53.3/s
/usr/local/bin/swift-bench -s 1 /etc/swift/swift-bench.conf
swift-bench 2011-06-21 17:42:37,899 INFO 74 PUTS [0 failures], 35.9/s
swift-bench 2011-06-21 17:42:38,478 INFO 100 PUTS **FINAL** [0 failures], 37.9/s
swift-bench 2011-06-21 17:42:38,545 INFO 10 GETS **FINAL** [0 failures], 182.0/s
swift-bench 2011-06-21 17:42:40,483 INFO 100 DEL **FINAL** [0 failures], 51.9/s
/usr/local/bin/swift-bench -s 209716 /etc/swift/swift-bench.conf
swift-bench 2011-06-21 17:42:43,675 INFO 43 PUTS [0 failures], 20.7/s
swift-bench 2011-06-21 17:42:46,061 INFO 100 PUTS **FINAL** [0 failures], 22.4/s
swift-bench 2011-06-21 17:42:46,147 INFO 10 GETS **FINAL** [0 failures], 135.7/s
swift-bench 2011-06-21 17:42:48,041 INFO 100 DEL **FINAL** [0 failures], 53.2/s
/usr/local/bin/swift-bench -s 419431 /etc/swift/swift-bench.conf
swift-bench 2011-06-21 17:42:51,037 INFO 48 PUTS [0 failures], 23.7/s
swift-bench 2011-06-21 17:42:54,806 INFO 100 PUTS **FINAL** [0 failures], 17.3/s
swift-bench 2011-06-21 17:42:54,914 INFO 10 GETS **FINAL** [0 failures], 103.4/s
swift-bench 2011-06-21 17:42:56,818 INFO 100 DEL **FINAL** [0 failures], 52.9/s
/usr/local/bin/swift-bench -s 629146 /etc/swift/swift-bench.conf
swift-bench 2011-06-21 17:42:59,882 INFO 32 PUTS [0 failures], 15.7/s
swift-bench 2011-06-21 17:43:10,959 INFO 100 PUTS **FINAL** [0 failures], 7.6/s
swift-bench 2011-06-21 17:43:11,100 INFO 10 GETS **FINAL** [0 failures], 78.9/s
swift-bench 2011-06-21 17:43:13,087 INFO 100 DEL **FINAL** [0 failures], 50.7/s
/usr/local/bin/swift-bench -s 838861 /etc/swift/swift-bench.conf
swift-bench 2011-06-21 17:43:16,200 INFO 15 PUTS [0 failures], 7.4/s
swift-bench 2011-06-21 17:43:23,832 INFO 100 PUTS **FINAL** [0 failures], 10.4/s
swift-bench 2011-06-21 17:43:23,986 INFO 10 GETS **FINAL** [0 failures], 70.8/s
swift-bench 2011-06-21 17:43:25,878 INFO 100 DEL **FINAL** [0 failures], 53.2/s
/usr/local/bin/swift-bench -s 1048576 /etc/swift/swift-bench.conf
swift-bench 2011-06-21 17:43:29,957 INFO 28 PUTS [0 failures], 13.5/s
swift-bench 2011-06-21 17:43:37,379 INFO 100 PUTS **FINAL** [0 failures], 10.5/s
swift-bench 2011-06-21 17:43:37,538 INFO 10 GETS **FINAL** [0 failures], 68.0/s
swift-bench 2011-06-21 17:43:39,431 INFO 100 DEL **FINAL** [0 failures], 53.2/s

グラフにしてみるとこんな感じ。

swift-bench

同時実行数(オブジェクトサイズは1KB固定)をどんなにあげても、PUT/GET/DELETE とも性能はかわらないことがわかりました。単純にメモリネックなのかもしれません。

一方、オブジェクトサイズを 1byte から 1Mbyte まであげてみると、サイズに比例して PUT/GET の性能が落ちてきていますね。まあ、当たり前ですが。DELETEについては、一定ですね。

おそらく私の環境に問題がある感じがしますので、あまり参考にならないベンチマーク結果ですね。まあ、ベンチマーク測定方法の備忘録ということにしたいと思います。

Related Posts Plugin for WordPress, Blogger...

Filed under: cloud · Tags: , ,

Leave a Reply

*