반응형

 


###### ab ( ApacheBench - 성능측정도구 )

Usage: ab [options] [http[s]://]hostname[:port]/path

Options are:
    -n requests     Number of requests to perform ( request 횟수 )
    -c concurrency  Number of multiple requests to make ( 동시접속 클라이언트 갯수 )
    -t timelimit    Seconds to max. wait for responses
    -b windowsize   Size of TCP send/receive buffer, in bytes
    -p postfile     File containing data to POST. Remember also to set -T
    -u putfile      File containing data to PUT. Remember also to set -T
    -T content-type Content-type header for POSTing, eg. 'application/x-www-form-urlencoded' Default is 'text/plain'
    -v verbosity    How much troubleshooting info to print
    -w              Print out results in HTML tables
    -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: gzip' 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
    -r              Don't exit on socket receive errors.
    -h              Display usage information (this message)
    -Z ciphersuite  Specify SSL/TLS cipher suite (See openssl ciphers)
    -f protocol     Specify SSL/TLS protocol (SSL2, SSL3, TLS1, or ALL)

예시)

$ ab -c 10 -n 10 http://192.168.100.1/

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 192.168.100.1 (be patient).....done

Server Software:
Server Hostname:        192.168.100.1
Server Port:            80

Document Path:          /
Document Length:        107 bytes

Concurrency Level:      10
Time taken for tests:   0.002 seconds
Complete requests:      10
Failed requests:        0
Write errors:           0
Non-2xx responses:      11
Total transferred:      2332 bytes
HTML transferred:       1177 bytes
Requests per second:    6013.23 [#/sec] (mean)
Time per request:       1.663 [ms] (mean)
Time per request:       0.166 [ms] (mean, across all concurrent requests)
Transfer rate:          1369.42 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.2      0       1
Processing:     0    0   0.2      0       1
Waiting:        0    0   0.1      0       0
Total:          1    1   0.1      1       1

Percentage of the requests served within a certain time (ms)
  50%      1
  66%      1
  75%      1
  80%      1
  90%      1
  95%      1
  98%      1
  99%      1
 100%      1 (longest request)
$

테스트 결과 해석

Server Software     : 아파치 버젼을 표시
Server Hostname     : 서버의 호스트명
Server Port         : 웹 서비스 사용 포트
Document Path       : 초기 문서가 존재하는 웹 문서 root 위치
Document Length     : 초기 문서의 크기
Concurrency Level   :
Time taken for tests: 응답시간 (중요!)
Complete requests   : 요구에 응답 완료한 세션수
Failed requests     : 요구에 응답 실패한 세션수
Write errors        :
Non-2xx responses   :
Total transferred   : 총 전송 바이트수
HTML transferred    : 총 전송한 HTML 바이트수
Requests per second : 초당 응답 요구수
Time per request    : 요구에 응답한 시간( 단위 micro second, 중요한 결과값)
Time per request    : 요구에 응답한 시간
Transfer rate       : 초당 전송 가능한 용량


###### gnuplot - ab의 결과를 그래프로 출력해주는 TOOL

http://www.gnuplot.info/download.html

 

참고 >

http://blog.aonenetworks.kr/220577073546

 

 

반응형
Posted by 공간사랑
,