첫번째 테스트
ab -n 1000 -c 16 사이트첫화면
Server Software: Apache
Server Hostname:
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
Document Path: /
Document Length: 13895 bytes
Concurrency Level: 16
Time taken for tests: 32.691 seconds
Complete requests: 1000
Failed requests: 914
(Connect: 0, Receive: 0, Length: 914, Exceptions: 0)
Total transferred: 14797608 bytes
HTML transferred: 14355608 bytes
Requests per second: 30.59 [#/sec] (mean)
Time per request: 523.050 [ms] (mean)
Time per request: 32.691 [ms] (mean, across all concurrent requests)
Transfer rate: 442.05 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 12 138 324.6 64 2733
Processing: 42 384 112.9 379 793
Waiting: 42 384 112.9 379 793
Total: 209 522 302.7 457 2830
Percentage of the requests served within a certain time (ms)
50% 457
66% 516
75% 546
80% 568
90% 654
95% 1045
98% 1692
99% 2098
100% 2830 (longest request)
두번째 테스트
ab -n 1000 -c 16 게시글
Server Software: Apache
Server Hostname:
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
Document Path: /bbs/173/
Document Length: 2405 bytes
Concurrency Level: 16
Time taken for tests: 15.388 seconds
Complete requests: 1000
Failed requests: 0
Non-2xx responses: 1000
Total transferred: 2875000 bytes
HTML transferred: 2405000 bytes
Requests per second: 64.99 [#/sec] (mean)
Time per request: 246.210 [ms] (mean)
Time per request: 15.388 [ms] (mean, across all concurrent requests)
Transfer rate: 182.45 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 12 77 36.9 69 270
Processing: 29 169 47.4 169 398
Waiting: 29 164 45.3 164 398
Total: 66 245 57.7 244 563
Percentage of the requests served within a certain time (ms)
50% 244
66% 265
75% 275
80% 287
90% 315
95% 349
98% 377
99% 397
100% 563 (longest request)
---------
두번째 게시글주소로 테스트해보면 Non-2xx responses 로 뜨는데요.
이건 Cloudflare를 적용해서 그런건가 싶긴한데..
첫번째 사이트첫화면으로 테스트했을때 failed 가 많이 뜨는건 정확한 이유를 모르겠네요..
두번째 테스트가 정상적인 결과라고 생각되긴 하는데....
최소사양 Nginx서버에서 테스트했을땐 이렇지 않았던거같은데...
최소사양 아파치서버에선 동접수를 50씩 놓으면 과하게 느려지거나 DB접속 에러를 뿜기도 하길래
2Core, 2GB 서버로 높여서 해봐도 생각만큼 나아지는거 같진않네요.
페이지 내용이나 길이가 조금이라도 달라지면 Failed request가 뜹니다. 조회수만 달라져도 에러가 날 수 있는 거죠. -l (소문자 L) 옵션을 주면 내용이나 길이의 변화를 무시하고 벤치마킹할 수 있습니다.
Non-2xx는 게시물 주소를 잘못 입력하셔서 XE가 mid를 포함한 주소로 계속 redirect시켜 주고 있는 것 같은데요. 속도가 갑자기 빨라진 것도 아마 그것 때문일 겁니다. 제대로 처리하지 않고 redirect에서 끊어 버리니까요.