解説
Apacheで標準でついてくる負荷テストツール。「Laravel Debugbar」もあるが、今回は、「Apache bench」を使用してみる。
「計測ツール – Apache bench」を使用したベンチマークテストの使用方法、内容を解説する。
更新日:2017年1月7日
複雑なことはできないが、非常に簡単に使用することができる。
使用方法
使用方法
ab -n 300 -c 30 https://inside-research.com/
パラメタ
- -n
- リクエスト回数
- -c
- 同時リクエスト数(並行性レベル)
計測結果サンプル
計測結果サンプル
This is ApacheBench, Version 2.3 <$Revision: 1757674 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking inside-research.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Finished 300 requests
Server Software: Apache
Server Hostname: inside-research.com
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES256-GCM-SHA384,2048,256
TLS Server Name: inside-research.com
Document Path: /
Document Length: 49206 bytes
Concurrency Level: 30
Time taken for tests: 1.667 seconds
Complete requests: 300
Failed requests: 0
Total transferred: 14909400 bytes
HTML transferred: 14761800 bytes
Requests per second: 180.01 [#/sec] (mean)
Time per request: 166.653 [ms] (mean)
Time per request: 5.555 [ms] (mean, across all concurrent requests)
Transfer rate: 8736.68 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 2 7 8.3 4 42
Processing: 52 137 59.5 126 468
Waiting: 52 136 59.5 125 468
Total: 77 144 59.2 131 473
Percentage of the requests served within a certain time (ms)
50% 131
66% 137
75% 141
80% 144
90% 198
95% 234
98% 361
99% 452
100% 473 (longest request)
実行結果の見方
- Server Software
- サーバー・ソフトウエア
- Server Hostname
- サーバー・ホスト名称
- Server Port
- サーバー・ポート
- SSL/TLS Protocol
- SSL/TLS プロトコル
- TLS Server Name
- TLS サーバー名称
- Document Path
- ドキュメント・パス
- Document Length
- ドキュメント・サイズ
- Concurrency Level
- 同時リクエスト数(並行性レベル)
- Time taken for tests
- テストにかかった時間(単位:秒)
- Complete requests
- 完了したリクエスト数
- Failed Requests
- 失敗したリクエスト数。これが発生している場合は、サーバが処理できる能力を超えている。
- Total transferred
- 転送された合計サイズ(単位:bytes)
- HTML transferred
- 転送されたHTMLサイズ(単位:bytes)
- Requests per second
- 1秒あたりに処理したリクエスト数。
- Time per request
- 1リクエストあたりの時間(単位:ms)
- Transfer rate
- 転送レート(単位:Kbytes/sec)
- Percentage of the requests served within a certain time (ms)
- 特定の時間内に処理された要求の割合(ミリ秒)。
必須要素
情報
- Ab(Apache Bench)
注意事項
重要
- なし。
更新履歴
- 2017/01/06 … 浅野 利博
- 新規作成