Easy Site Benchmarking[Benchmark][Web]

このエントリーをはてなブックマークに追加


2006-02-04


Easy Site Benchmarking
http://public.e-tunity.com/sitebenchmark/sitebenchmark.html

http://freshmeat.net を見てて見つけた Perl で作られた Web benchmark。グラフ描写用に、gnuplot 用のデータを吐き出させることも可能です。

$ tar zxvf sitebenchmark.tar.gz
$ cd sitebenchmark
$ su
# make install


で、/usr/local にインストールされる。もしインストール先を変えたければ

# export EBASE=/usr
# make install


と、環境変数で設定する。必要とされる Perl モジュールは

- Getopt::Std
- IO::Socket::INET
- Time::HiRes

の3つ。その他には、gnuplot が必要。

実行例

$ echo 'GET /' | sitebench -v 5 100 192.0.2.1 80 Welcome > bench.log


上記の例だと、192.0.2.1 の 80 ポートへ "GET /" のリクエストを発行することになります。掛ける負荷は、同時接続数 5で、そのクライアント毎に100リクエストを投げることに。またリクエストの成功は、"Welcome" がレスポンスに含まれているかどうかで判断されます。

で、ある実験用サーバで試した結果が以下

bench.log

5327 1 0.07574 1 0.022984
5327 1 0.039719 1 0.255656
〜中略〜
5331 1 0.052004 1 0.024625
5331 1 0.050035 1 0.023592
5331 1 0.050952 1 0.023404
5331 1 0.052174 1 0.023401


実際には、テスターとして、かなり非力なクライアントを使ったので、そっちの影響の方が大きいかも?

これを sitecollect に掛けます。

$ sitecollect <bench.log
Analysis Overview
Failed connects: 0
Succeeded connects: 500
Mean successful connect time: 0.046193328
SD successful connect times: 2.23098586457074e-05
Failed matches: 0
Mean failed match request time: 0
SD failed match times: 0
Succeeded matches: 500
Mean succeeded match time: 0.024235006
SD succeeded match times: 0.000113374238827619
Mean total processing time: 0.070428334
SD total processing time: 0.000135791207709864


で、siteplot で、gnuplot 用のコマンドファイルを吐き出させます。

$ siteplot 'Benchmark of www.example.org' graph <bench.log
Collecting data..
500 successes collected, sorting..
5% occurs at index 405, value 0.063377
25% occurs at index 23, value 0.066454
75% occurs at index 454, value 0.072567
95% occurs at index 145, value 0.077346


ちなみに、データが少なすぎると

 $ siteplot 'Benchmark of www.mysite.org' graph <bench.log
 Collect ing data..
 0 successes collected, sorting..
 Can't use an undefined value as an ARRAY reference at /usr/local/bin/siteplot line 96, <STDIN> line 20.


こんな感じでエラーが出たり。それはさておき、これを gnuplot に食わせます。

$ gnuplot
gnuplot> load 'graph.gnuplot'


Image


ん〜 ab よりはいいんだろうなぁ。もうちょっと負荷を掛けた状態で試さないとだめかも。もうちょっと負荷をしっかり掛けられるぐらいのCPUを持ったクライアントで試してみよう(^_^;



IPv4/IPv6 meter
検索キーワードは複数指定できます
ChangeLogを検索
Google
Web www.kunitake.org
思ったより安い……時もある、Amazon

カテゴリ