[PHP-users 1861] Re: 耐性テスト?

Tetsuro HONDA php-users@php.gr.jp
Thu, 06 Sep 2001 13:57:24 +0900


At 11:43 2001/09/06 +0900, you wrote:
> サーバーの耐性テスト、レスポンステスト、ベンチマーク・・・
> なんと表現したらよいのか、同時submit等のテストをおこないたいのです。
> 何らかのツールなどで1000台同時アクセス、同時submit等の評価をおこなえる
> 方法がありましたら教えてください。

 お手軽な方法ということで Apache 標準添付の ab (ApacheBench)は如何でしょ?

% cd /usr/local/apache/bin/
% ls
ab*          apxs*        htdigest*    httpd*       rotatelogs*
apachectl*   dbmmanage*   htpasswd*    logresolve*
% ./ab
./ab: wrong number of arguments
Usage: ./ab [options] [http://]hostname[:port]/path
Options are:
    -n requests     Number of requests to perform
    -c concurrency  Number of multiple requests to make
    -t timelimit    Seconds to max. wait for responses
    -p postfile     File containg data to POST
    -T content-type Content-type header for POSTing
    -v verbosity    How much troubleshooting info to print
    -w              Print out results in HTML tables
    -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: zop'
                    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.
    -V              Print version number and exit
    -k              Use HTTP KeepAlive feature
    -h              Display usage information (this message)


% ./ab -n 1000 -k -c 100 http://localhost/
This is ApacheBench, Version 1.3a
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/

Server Software:        Apache/1.3.9
Server Hostname:        localhost
Server Port:            80

Document Path:          /
Document Length:        10295 bytes

Concurrency Level:      100
Time taken for tests:   35.510 seconds
Complete requests:      1000
Failed requests:        770
   (Connect: 0, Length: 770, Exceptions: 0)
Keep-Alive requests:    0
Total transferred:      10703325 bytes
HTML transferred:       10522365 bytes
Requests per second:    28.16
Transfer rate:          301.42 kb/s received

Connnection Times (ms)
              min   avg   max
Connect:        0     5   609
Processing:   372  3321  4889
Total:        372  3326  5498



% (株)ジー・サーチ システム統括部 システムサービス部
% 本多哲郎 <honda@gsh.co.jp>
% 外線 : 03-5444-2933 / 内線 : 7067-3055(港区海岸LOOP-X 3F)

★ 勤務地,外線,内線,メールアドレスが変わりました ★