Apache の性能評価について(2002/07/10) 
 

性能評価 とは

インストールした Apache の性能評価を行うためには、色々な局面から検証可能ですが、ここでは Apache 付属の ab コマンドを実行して性能を評価してみます。また Apache は、フリーウエアながら 中小のサイトから、大きい(トランザクションが多い)サイトまで幅広く使用されていますが、デフォルトの状態で使用せず、的確なチューニングを行う事により性能を2倍3倍にもすることが可能です。 

特に ab コマンドは、Apache だけの性能測定コマンドでは無いため、他のWebサーバ等を比較するときや、特定 cgi の実行速度、PHP4 と Perl の性能評価と幅広く性能評価を行う事ができます。

  参考 : Apacheパフォーマンス・チューニングのポイント

  参考 : PHP4 vs FastCGI

性能測定方法

1.Apache 付属の ab コマンドを使用します。下記は、localhost の Apache に対して実行した結果です。

% ./ab -n 100 -c 10 http://localhost/
This is ApacheBench, Version 1.3d <$Revision: 1.65 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient).....done
Server Software: Apache/1.3.26
Server Hostname: localhost
Server Port: 80

Document Path: /
Document Length: 3483 bytes

Concurrency Level: 10
Time taken for tests: 0.176 seconds
Complete requests: 100
Failed requests: 0
Broken pipe errors: 0
Total transferred: 381900 bytes
HTML transferred: 348300 bytes
Requests per second: 568.18 [#/sec] (mean)
Time per request: 17.60 [ms] (mean)
Time per request: 1.76 [ms] (mean, across all concurrent requests)
Transfer rate: 2169.89 [Kbytes/sec] received

Connnection Times (ms)
min mean[+/-sd] median max
Connect: 0 1 1.5 0 7
Processing: 4 14 5.4 15 31
Waiting: 2 14 5.5 15 31
Total: 4 15 4.9 15 35

Percentage of the requests served within a certain time (ms)
50% 15
66% 17
75% 18
80% 18
90% 21
95% 24
98% 28
99% 31
100% 35 (last request)