■Apacheサーバのベンチ測定

abのコマンドでApacheのベンチが測定できる。下記は1000リクエストを100リクエストずつサーバに送るコマンド

#ab -n 1000 -c 100 -w http://localhost/

実行結果はhtml形式で出力されるのでリダイレクトなどでファイルにすると良い。

This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Server Software: Apache
Server Hostname: localhost
Server Port: 80
Document Path: /
Document Length: 1924 bytes
Concurrency Level: 100
Time taken for tests: 0.461 seconds
Complete requests: 1000
Failed requests: 0
Total transferred: 2208351 bytes
HTML transferred: 1937468 bytes
Requests per second: 2169.20
Transfer rate: 4790.35 kb/s received
Connnection Times (ms)
  min avg max
Connect: 0 2 5
Processing: 10 40 43
Total: 10 42 48