「httperf」の編集履歴(バックアップ)一覧はこちら

httperf」(2011/03/25 (金) 08:08:40) の最新版変更点

追加された行は緑色になります。

削除された行は赤色になります。

httperfは、HP社(の系列会社?)で作成されたWebサーバーの負荷テストツールです。 現在はsourceforgeで管理されているようです。  http://sourceforge.net/projects/httperf/ **インストール ubuntu10.10ではすでにパッケージになっており、以下でインストールできます。 $ sudo apt-get install httperf **使い方  コマンドの書式は以下のとおり。 $ httperf --help Usage: httperf [-hdvV] [--add-header S] [--burst-length N] [--client N/N] [--close-with-reset] [--debug N] [--failure-status N] [--help] [--hog] [--http-version S] [--max-connections N] [--max-piped-calls N] [--method S] [--no-host-hdr] [--num-calls N] [--num-conns N] [--period [d|u|e]T1[,T2]] [--port N] [--print-reply [header|body]] [--print-request [header|body]] [--rate X] [--recv-buffer N] [--retry-on-failure] [--send-buffer N] [--server S] [--server-name S] [--session-cookies] [--ssl] [--ssl-ciphers L] [--ssl-no-reuse] [--think-timeout X] [--timeout X] [--uri S] [--verbose] [--version] [--wlog y|n,file] [--wsess N,N,X] [--wsesslog N,X,file] [--wset N,X] 詳細はmanをみてもらうとして、簡単には以下のように指定すると実行できます。 $ httperf --server localhost --port 8080 --uri /tmp/testfile --rate 10 --num-conn 100 --num-call 3 –server サーバのホスト指定 –port ポート番号を指定 –uri ドキュメントのパスを指定 –rate 1秒間に生成するコネクション数 –num-conn ベンチマークを終了するコネクション数。 –num-call KeepAliveを設定している場合、1コネクションに含めるリクエスト数を指定 上記のオプションだと、1秒間に10コネクションずつ生成し、1つのコネクションで3回「http://localhost:8080/tmp/testfile」に対し、GETメソッドを実行します。少しして生成したコネクション数が100になると、ベンチマークが終了します。 実行例 $ httperf --server 127.0.0.1 --port 8080 --uri /tmp/testfile --rate 10 --num-conn 100 --num-call 3 \ httperf --client=0/1 --server=127.0.0.1 --port=8080 --uri=/tmp/testfile --rate=10 --send-buffer=4096 \ --recv-buffer=16384 --num-conns=100 --num-calls=3 Maximum connect burst length: 1 Total: connections 100 requests 300 replies 300 test-duration 9.998 s Connection rate: 10.0 conn/s (100.0 ms/conn, <=2 concurrent connections) Connection time [ms]: min 73.5 avg 84.2 max 125.0 median 81.5 stddev 6.8 Connection time [ms]: connect 0.1 Connection length [replies/conn]: 3.000 Request rate: 30.0 req/s (33.3 ms/req) Request size [B]: 74.0 Reply rate [replies/s]: min 30.0 avg 30.0 max 30.0 stddev 0.0 (1 samples) Reply time [ms]: response 1.9 transfer 26.2 Reply size [B]: header 110.0 content 48.0 footer 2.0 (total 160.0) Reply status: 1xx=0 2xx=300 3xx=0 4xx=0 5xx=0 CPU time [s]: user 0.96 system 4.57 (user 9.6% system 45.7% total 55.3%) Net I/O: 6.8 KB/s (0.1*10^6 bps) Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0 Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0 ---- #comment() ----
httperfは、HP社(の系列会社?)で作成されたWebサーバーの負荷テストツールです。 現在はsourceforgeで管理されているようです。  http://sourceforge.net/projects/httperf/ **インストール ubuntu10.10ではすでにパッケージになっており、以下でインストールできます。 $ sudo apt-get install httperf **使い方  コマンドの書式は以下のとおり。 $ httperf --help Usage: httperf [-hdvV] [--add-header S] [--burst-length N] [--client N/N] [--close-with-reset] [--debug N] [--failure-status N] [--help] [--hog] [--http-version S] [--max-connections N] [--max-piped-calls N] [--method S] [--no-host-hdr] [--num-calls N] [--num-conns N] [--period [d|u|e]T1[,T2]] [--port N] [--print-reply [header|body]] [--print-request [header|body]] [--rate X] [--recv-buffer N] [--retry-on-failure] [--send-buffer N] [--server S] [--server-name S] [--session-cookies] [--ssl] [--ssl-ciphers L] [--ssl-no-reuse] [--think-timeout X] [--timeout X] [--uri S] [--verbose] [--version] [--wlog y|n,file] [--wsess N,N,X] [--wsesslog N,X,file] [--wset N,X] 詳細はmanをみてもらうとして、簡単には以下のように指定すると実行できます。 $ httperf --server localhost --port 8080 --uri /tmp/testfile --rate 10 --num-conn 100 --num-call 3 –server サーバのホスト指定 –port ポート番号を指定 –uri ドキュメントのパスを指定 –rate 1秒間に生成するコネクション数 –num-conn ベンチマークを終了するコネクション数。 –num-call KeepAliveを設定している場合、1コネクションに含めるリクエスト数を指定 上記のオプションだと、1秒間に10コネクションずつ生成し、1つのコネクションで3回「http://localhost:8080/tmp/testfile」に対し、GETメソッドを実行します。少しして生成したコネクション数が100になると、ベンチマークが終了します。 実行例 $ httperf --server 127.0.0.1 --port 8080 --uri /tmp/testfile --rate 10 --num-conn 100 --num-call 3 httperf --client=0/1 --server=127.0.0.1 --port=8080 --uri=/tmp/testfile --rate=10 --send-buffer=4096 --recv-buffer=16384 --num-conns=100 --num-calls=3 Maximum connect burst length: 1 Total: connections 100 requests 300 replies 300 test-duration 9.998 s Connection rate: 10.0 conn/s (100.0 ms/conn, <=2 concurrent connections) Connection time [ms]: min 73.5 avg 84.2 max 125.0 median 81.5 stddev 6.8 Connection time [ms]: connect 0.1 Connection length [replies/conn]: 3.000 Request rate: 30.0 req/s (33.3 ms/req) Request size [B]: 74.0 Reply rate [replies/s]: min 30.0 avg 30.0 max 30.0 stddev 0.0 (1 samples) Reply time [ms]: response 1.9 transfer 26.2 Reply size [B]: header 110.0 content 48.0 footer 2.0 (total 160.0) Reply status: 1xx=0 2xx=300 3xx=0 4xx=0 5xx=0 CPU time [s]: user 0.96 system 4.57 (user 9.6% system 45.7% total 55.3%) Net I/O: 6.8 KB/s (0.1*10^6 bps) Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0 Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0 ---- #comment() ----

表示オプション

横に並べて表示:
変化行の前後のみ表示: