아파치 스트레스툴 ab 해석문의드립니다.

cdral의 이미지

# ab -n 500 -c 500 http://사이트주소/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 사이트주소 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Finished 500 requests

Server Software: Apache/2.2.10
Server Hostname: 사이트주소
Server Port: 80

Document Path: /경로/
Document Length: 59091 bytes

Concurrency Level: 500
Time taken for tests: 14.129 seconds
Complete requests: 500
Failed requests: 74
(Connect: 0, Receive: 0, Length: 74, Exceptions: 0)
Write errors: 0
Total transferred: 25339186 bytes
HTML transferred: 25179722 bytes
Requests per second: 35.39 [#/sec] (mean)
Time per request: 14129.100 [ms] (mean)
Time per request: 28.258 [ms] (mean, across all concurrent requests)
Transfer rate: 1751.37 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 12 5.4 12 21
Processing: 61 6051 3561.2 6418 14108
Waiting: 60 6051 3561.2 6418 14108
Total: 61 6063 3566.0 6430 14129

Percentage of the requests served within a certain time (ms)
50% 6430
66% 6985
75% 7636
80% 8243
90% 12892
95% 13542
98% 13912
99% 14033
100% 14129 (longest request)

결과출력물입니다.
Time taken for tests 항목에 값이 14초가 나왔는데 이걸보고 해석을 어떻게 해야될까요

500건의 동시접속을 처리하는데 총14초가 걸렸다는것같은데 그렇다면 상당히 느린게 아닌가요?
500명이 동시접속시 페이지가 뜰때까지 14초를 기다린셈인가요?

monovision의 이미지

failed request 가 존재하네요.

Failed requests: 74

측정 서버의 문제가 존재할 수도 있으니 해당 부분도 같이 살펴보세요.
그리고 ab 는 그냥 ab 일 뿐입니다. 제대로 된 성능 측정이 아니니 참고용으로만 사용하세요.

아래는 제가 운영하는 서버로 -c 500 -n 500 으로 날린 결과입니다.
파일 사이즈가 3배네요 ㅡ.ㅡ;;;

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 adimg.nate.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Finished 500 requests

Server Software: [삭제]
Server Hostname: [삭제]
Server Port: 80

Document Path: [삭제]
Document Length: 178757 bytes

Concurrency Level: 500
Time taken for tests: 1.154 seconds
Complete requests: 500
Failed requests: 0
Write errors: 0
Total transferred: 89616000 bytes
HTML transferred: 89378500 bytes
Requests per second: 433.21 [#/sec] (mean)
Time per request: 1154.173 [ms] (mean)
Time per request: 2.308 [ms] (mean, across all concurrent requests)
Transfer rate: 75825.40 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 10 13 1.9 13 16
Processing: 1038 1100 22.3 1105 1129
Waiting: 9 51 20.1 63 68
Total: 1054 1113 20.6 1118 1139

Percentage of the requests served within a certain time (ms)
50% 1118
66% 1126
75% 1129
80% 1131
90% 1135
95% 1137
98% 1138
99% 1138
100% 1139 (longest request)

cdral의 이미지

저보다 파일사이즈는 3배 많은데 Time taken for tests는 1초대라니 놀랍습니다.
ab로 참고용으로 쓴다해도 결과를 보았을때 이정도면 동접이나 부하율이
괜찮은수준이다라고 판단할수있는 기준점이 되는게 어떤항목인가요?

cjh의 이미지

먼저 -n 은 적당히 길게 잡고 (1000정도) -c 값을 1,10,100,200 식으로 바꾸어 가면서
failed 가 0보다 커지는 시점을 잡으면 그 때의 -c 값이 해당 서버에 적당한 동접
값입니다. failed 가 생기면 사이트 접속이 실패한다는 건데 부하가 높든지 서버 튜닝이
잘못되었든 여러가지 이유가 있습니다.

그 다음은 올려주신 결과 안에서

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 12 5.4 12 21
Processing: 61 6051 3561.2 6418 14108
Waiting: 60 6051 3561.2 6418 14108
Total: 61 6063 3566.0 6430 14129

이걸 보시는데 mean 다음의 +-sd (표준편차)값이 매우 작아야 합니다
(즉 처리에 걸리는 시간이 일정해야 한다는 의미) 여기서는 Total만 봐도 3566 (ms)나 되는데
댓글 올려주신 분 결과를 참고로 보면

Connection Times (ms)
min mean[+/-sd] median max
Connect: 10 13 1.9 13 16
Processing: 1038 1100 22.3 1105 1129
Waiting: 9 51 20.1 63 68
Total: 1054 1113 20.6 1118 1139

이니까 sd가 20.6ms밖에 안됩니다. 이건 매우 좋은 결과라서 서버 성능이 남아도는 상황
(또는 튜닝을 매우 잘 한 상황)이라고 생각이 되고요.

어쨌든 -c 의 최대값을 먼저 찾으시고, 서버 설정 바꾸어 가면서 -c 값을 올려도
failed가 생기지 않도록 해 보시면 됩니다.

--
익스펙토 페트로눔

--
익스펙토 페트로눔