AB 사용법 - Apache Benchmarking
]# ./ab -h
Usage: ./ab [options] [http://]hostname[:port]/path
Options are:
-n requests Number of requests to perform : 벤치마킹을 위한 요청수
-c concurrency Number of multiple requests to make : 하나의 요청당 체크할 다중 요구수 (기본값 : 1)
-t timelimit Seconds to max. wait for responses : 제한시간
-p postfile File containg data to POST : POST 할 파일 지정
-T content-type Content-type header for POSTing
-v verbosity How much troubleshooting info to print : 자세한 헤더정보 출력 (유용함)
-w Print out results in HTML tables : HTML 형태로 출력 (유용함)
-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: zop'
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
-h Display usage information (this message)
Example)
]# ./ab -c 30 -n 10 http://www.naver.com/
This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking www.naver.com (be patient).....done
Server Software: Apache
Server Hostname: www.naver.com
Server Port: 80
Document Path: /
Document Length: 74556 bytes
Concurrency Level: 30
Time taken for tests: 0.151 seconds
Complete requests: 10
Failed requests: 8
(Connect: 0, Length: 8, Exceptions: 0)
Broken pipe errors: 0
Total transferred: 1096903 bytes
HTML transferred: 1085914 bytes
Requests per second: 66.23 [#/sec] (mean)
Time per request: 453.00 [ms] (mean)
Time per request: 15.10 [ms] (mean, across all concurrent requests)
Transfer rate: 7264.26 [Kbytes/sec] received
Connnection Times (ms)
min mean[+/-sd] median max
Connect: 3 3 0.3 3 5
Processing: 38 72 34.8 80 148
Waiting: 33 71 34.7 79 147
Total: 38 76 34.4 83 151
WARING: The median and mean for the initial connection time are not within a normal deviation
These results are propably not that reliable.
Percentage of the requests served within a certain time (ms)
50% 83
66% 83
75% 94
80% 98
90% 151
95% 151
98% 151
99% 151
100% 151 (last request)