ApacheBench



概要

Apache HTTP Serverに同梱されている性能テストツール

インストール


CentOS

#head -1 /etc/issue
CentOS release 5.7 (Final)

#rpm -ql httpd-2.2.3-53.el5.centos.3 | grep bin\/ab
/usr/bin/ab

※httpdに同梱

AMI

# head -1 /etc/issue
Amazon Linux AMI release 2015.03
 
# rpm -ql httpd-tools-2.2.29-1.5.amzn1.x86_64 | grep /\ab
/usr/bin/ab

※httpd-toolsに同梱

テスト方法

オプション

オプション 内容
-t 数値 サーバからのレスポンスの待ち時間(秒)を数値で指定
-P ユーザー名:パスワード 認証の必要なプロキシを通じてテストする
-n 数値 テストで発行するリクエストの回数を数値で指定
-c 数値 テストで同時に発行するリクエストの数を数値で指定
-a ユーザー名:パスワード ベーシック認証が必要なコンテンツにテストする

テスト例

http://www.exapmle.com/へ100クライアントから1000回実行する例
# ab -n 1000 -c 100 http://www.exapmle.com/

出力結果

項目 内容
Server Software Apacheのバージョン
Server Hostname サーバマシン名
Server Port ポート番号
Document Path アクセス先ファイル
Document Length アクセス先ファイルサイズ
Concurrency Level 同時送信リクエスト数
Time taken for tests リクエスト完了に要した処理時間
Complete requests 総リクエスト数
Failed requests 失敗したリクエスト回数
Total transferred ファイルの総容量
HTML transferred アクセス先ファイルの容量
Requests per second 1秒あたりに処理されたリクエスト数
Time per request 1秒あたりに処理された所要時間
Time per request(mean, across all concurrent requests) 1秒あたりに処理された所要時間
Transfer rate 1秒あたりに受信された容量
Connnection Times (ms) 上から順に接続(Connect)、処理(Processing)、待ち時間(Wait)を集計し、最小値、平均、最大値、平均で表している
Percentage of the requests served within a certain time (ms) 処理時間の推移

  • 最終更新:2015-04-22 23:15:31

このWIKIを編集するにはパスワード入力が必要です

認証パスワード