Apacheをベンチマークする方法
Modified: 23 December 2005
"ab"コマンド
Apacheのベンチマークソフトは、デフォルトで、"ab"コマンドがインストールされています。
連続アクセスを、"-n 100"。同時アクセスを、"-c 100"で指定してみました。
# ab -n 100 -c 100 http://tomo.ac/index.html This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.1 $> apache-2.0 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/ Benchmarking tomo.ac (be patient).....done Server Software: Apache/2.0.46 Server Hostname: tomo.ac Server Port: 80 Document Path: /index.html Document Length: 27 bytes Concurrency Level: 100 Time taken for tests: 1.682695 seconds Complete requests: 100 Failed requests: 0 Write errors: 0 Total transferred: 29600 bytes HTML transferred: 2700 bytes Requests per second: 59.43 [#/sec] (mean) Time per request: 1682.695 [ms] (mean) Time per request: 16.827 [ms] (mean, across all concurrent requests) Transfer rate: 16.64 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 2 3.9 0 17 Processing: 462 739 152.5 740 950 Waiting: 211 645 185.3 659 932 Total: 462 741 151.4 742 950 Percentage of the requests served within a certain time (ms) 50% 742 66% 840 75% 892 80% 909 90% 932 95% 940 98% 949 99% 950 100% 950 (longest request) #
使い方は以下のページに詳しく書いてありました。
http://www.atmarkit.co.jp/flinux/rensai/apache2_02/apache02b.html