apache ab를 이용한 부하테스트
apache에서 제공하는 ab를 이용하여 웹서버 응답속도 측정해보는 간단한 방법입니다.
ab는 apache설치 시 bin밑에 자동 설치되어 있습니다.
[ab 옵션]
c :동접 client 수
n : 페이지요청 수
t : test 허용시간
ip : 테스트 할 서버
[aaa@abc:/apache/apache-2.4.10_W/bin]# ab -c 1000 -n 1000 -t 20 http://10.10.10.10/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 10.10.10.10 (be patient)
Finished 2106 requests
Server Software: Apache/2.4.10
Server Hostname: 10.10.10.10
Server Port: 80
Document Path: /
Document Length: 7662 bytes
Concurrency Level: 1000
Time taken for tests: 20.002 seconds 응답시간
Complete requests: 2106
Failed requests: 0
Write errors: 0
Total transferred: 16692156 bytes
HTML transferred: 16136172 bytes
Requests per second: 105.29 [#/sec] (mean) 초당 request(micro seceond)
Time per request: 9497.686 [ms] (mean)
Time per request: 9.498 [ms] (mean, across all concurrent requests)
Transfer rate: 814.96 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 189 703.1 0 3004
Processing: 131 1611 1339.7 949 8012
Waiting: 122 1593 1328.2 940 8002
Total: 145 1800 1721.6 953 11015
Percentage of the requests served within a certain time (ms)
50% 953
66% 1468
75% 2201
80% 2792
90% 4117
95% 5506
98% 6910
99% 8334
100% 11015 (longest request)