ApacheBench
abを使ってbenchmarkをとってみる.
■Usage
% ab -h
Usage: ab [options] [http[s]://]hostname[:port]/path
Options are:
-n requests Number of requests to perform
-c concurrency Number of multiple requests to make
-t timelimit Seconds to max. wait for responses
-p postfile File containing data to POST
-T content-type Content-type header for POSTing
-v verbosity How much troubleshooting info to print
-w Print out results in HTML tables
-i Use HEAD instead of GET
-x attributes String to insert as table attributes
-y attributes String to insert as tr attributes
-z attributes String to insert as td or th attributes
-C attribute Add cookie, eg. 'Apache=1234. (repeatable)
-H attribute Add Arbitrary header line, eg. 'Accept-Encoding: gzip'
Inserted after all normal header lines. (repeatable)
-A attribute Add Basic WWW Authentication, the attributes
are a colon separated username and password.
-P attribute Add Basic Proxy Authentication, the attributes
are a colon separated username and password.
-X proxy:port Proxyserver and port number to use
-V Print version number and exit
-k Use HTTP KeepAlive feature
-d Do not show percentiles served table.
-S Do not show confidence estimators and warnings.
-g filename Output collected data to gnuplot format file.
-e filename Output CSV file with percentages served
-s Use httpS instead of HTTP (SSL)
-h Display usage information (this message)
■使ってみる
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.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 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests
Server Software: qwikWeb/0.7.0+20050830
Server Hostname: 127.0.0.1
Server Port: 9190
Document Path: /
Document Length: 6160 bytes
Concurrency Level: 100
Time taken for tests: 101.564367 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 6410834 bytes
HTML transferred: 6164096 bytes
Requests per second: 9.85 [#/sec] (mean)
Time per request: 10156.437 [ms] (mean)
Time per request: 101.564 [ms] (mean, across all concurrent requests)
Transfer rate: 61.64 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1575 3864.3 0 45085
Processing: 382 6503 16397.6 630 56793
Waiting: 308 6346 16274.0 516 56401
Total: 382 8079 17908.6 656 71431
Percentage of the requests served within a certain time (ms)
50% 656
66% 766
75% 3611
80% 3726
90% 56838
95% 59851
98% 62660
99% 62950
100% 71431 (longest request)
Last modified: 2006-09-05