Jiniya

WEB

Apache 2 : bin/ab 성능 테스트

Apache(아파치) 를 설치하고 나서 conf/httpd.conf , conf/extra/httpd-*.conf 등의 설정을 하게된다. 하지만 내가 한 설정이 서버에 긍정적인 영향을 주었는지, 오히려 악영향을 끼쳤는지 알 수가 없다. 그럴때는 설정을 변경하기 전에 ab(아파치 벤치마킹 툴) 를 이용하여, 변경 전의 설정과 변경 후의 설정에 따른 서버의 성능 테스트 값을 비교해보아야 한다. 아래와 같은 명령어로 ab 를 실행해본다.
 
shell> cd /usr/local/apache/bin shell> ./ab -n 1000 -c 1000 http://192.168.230.130/
Server Software: Apache/2.2.10 Server Hostname: 192.168.230.130 Server Port: 80 Document Path: / Document Length: 44 bytes Concurrency Level: 1000 Time taken for tests: 1.626 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 327000 bytes HTML transferred: 44000 bytes Requests per second: 615.11 [#/sec] (mean) Time per request: 1625.718 [ms] (mean) Time per request: 1.626 [ms] (mean, across all concurrent requests) Transfer rate: 196.43 [Kbytes/sec] received

Time taken for tests 와 Time per request 의 수치값이 낮을수록 좋은 성능을 내고 있다고 생각하면 된다. 이 값을 낮추기위해 설정 값들을 변경해보고 ab 테스트를 해보길 바란다. 다중세션과 KeepAlive 속성 사용하여 테스트 하기 아래 테스트는 250개의 세션에서 각각 4번씩 요청하여(KeepAlive On), 총 1000회의 Requests 를 처리합니다.
 
shell> ./ab -n 1000 -c 250 -k http://192.168.230.130/

참고 사이트 > http://www.superuser.co.kr/home/lecture/index.php?cateNo=2&secNo=13&theNo=34&leccode=10383