竹:で、大崎さんも入ることになりました。
研修の一環らしいです。
大:ホントですか?
あっちで、笑ってますけど・・・。
竹:まあ、いきなり「オン・ザ・
ジョブ」より
いいと思うよ。
じゃあ、始めます。
今日は、
連続で、3回
コマンドをうつと
どうなるか、とか、やりましょう。
回数やリクエスト数も
増やしていきますね。
大:はい。
では、さっそく。
@1回目
[root@bind1 ~]#
ab -n 100 -c 10 http://192.168.1.14/This is ApacheBench,
Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/Copyright 2006 The Apache Software Foundation,
http://www.apache.org/Benchmarking 192.168.1.14 (be patient).....done
Server Software: Apache/2.2.3
Server Hostname: 192.168.1.14
Server Port: 80
Document Path: /
Document Length: 3956 bytes
Concurrency Level: 10
Time taken for tests: 0.217954 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Non-2xx responses: 100
Total transferred: 415300 bytes
HTML transferred: 395600 bytes
Requests per
second: 458.81 [#/sec] (mean)
Time per request: 21.795 [ms] (mean)Time per request: 2.180 [ms] (mean, across all concurrent requests)
Transfer rate: 1858.19 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 2.6 0 15
Processing: 3 19 48.6 3 205
Waiting: 2 10 21.1 3 86
Total: 3 20 50.3 3 210
Percentage of the requests served within a certain time (ms)
50% 3
66% 3
75% 4
80% 4
90% 90
95% 207
98% 209
99% 210
100% 210 (longest request)
A2回目
[root@bind1 ~]#
ab -n 100 -c 10 http://192.168.1.14/This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/Copyright 2006 The Apache Software Foundation,
http://www.apache.org/Benchmarking 192.168.1.14 (be patient).....done
Server Software: Apache/2.2.3
Server Hostname: 192.168.1.14
Server Port: 80
Document Path: /
Document Length: 3956 bytes
Concurrency Level: 10
Time taken for tests: 0.371554 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Non-2xx responses: 100
Total transferred: 415300 bytes
HTML transferred: 395600 bytes
Requests per second: 269.14 [#/sec] (mean)
Time per request: 37.155 [ms] (mean)Time per request: 3.716 [ms] (mean, across all concurrent requests)
Transfer rate: 1090.02 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 2 3.0 0 12
Processing: 4 27 6.7 28 48
Waiting: 0 20 6.3 21 37
Total: 8 29 7.8 30 57
Percentage of the requests served within a certain time (ms)
50% 30
66% 32
75% 33
80% 35
90% 38
95% 43
98% 52
99% 57
100% 57 (longest request)
B3回目
[root@bind1 ~]# ab -n 100 -c 10
http://192.168.1.14/This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
http://www.zeustech.net/Copyright 2006 The Apache Software Foundation,
http://www.apache.org/Benchmarking 192.168.1.14 (be patient).....done
Server Software: Apache/2.2.3
Server Hostname: 192.168.1.14
Server Port: 80
Document Path: /
Document Length: 3956 bytes
Concurrency Level: 10
Time taken for tests: 0.138588 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Non-2xx responses: 100
Total transferred: 415300 bytes
HTML transferred: 395600 bytes
Requests per second: 721.56 [#/sec] (mean)
Time per request: 13.859 [ms] (mean)Time per request: 1.386 [ms] (mean, across all concurrent requests)
Transfer rate: 2922.33 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1 1.8 1 7
Processing: 2 10 3.3 11 20
Waiting: 0 4 2.8 4 16
Total: 3 12 3.8 12 23
Percentage of the requests served within a certain time (ms)
50% 12
66% 14
75% 15
80% 15
90% 17
95% 20
98% 22
99% 23
100% 23 (longest request)
■
比較@Time per request: 21.795 [ms] (mean)
ATime per request: 37.155 [ms] (mean)
BTime per request: 13.859 [ms] (mean)
竹:意味分からん・・・。
ひょっとして、
はったコネクションを、
すぐに利用すると、
レスポンスが上がるのかも・・・。
あれー、でも、
たまに、異常に増える時あるなぁー。
(例)
Time per request: 41.532 [ms] (mean)
竹:あれ、下がらなくなったぞ。
(コマンドを、繰り返し打ち続ける)
竹:まさか、
プロセスだらけになってたりして・・・。
うわっ!
[root@bind1 ~]#
netstat -an | grep 80(多すぎて、省略)
tcp 0 0 ::ffff:192.168.1.14:80 ::ffff:192.168.1.14:50799 TIME_WAIT
tcp 0 0 ::ffff:192.168.1.14:80 ::ffff:192.168.1.14:50543 TIME_WAIT
tcp 0 0 ::ffff:192.168.1.14:80 ::ffff:192.168.1.14:50287 TIME_WAIT
tcp 0 0 ::ffff:192.168.1.14:80 ::ffff:192.168.1.14:50031 TIME_WAIT
tcp 0 0 ::ffff:192.168.1.14:80 ::ffff:192.168.1.14:49775 TIME_WAIT
竹:なるほど。
しかし、こんなに多くなるのか・・・。
http1.1 だから・・・、か。
うーーん。
しばらく、放っておくと元に戻る・・か。
(下記参照)
[root@bind1 ~]#
netstat -an | grep 80tcp 0 0 127.0.0.1:57801 0.0.0.0:* LISTEN
tcp 0 0 :::80 :::* LISTEN
unix 3 [ ] STREAM CONNECTED 6480
unix 2 [ ] DGRAM 4380
■参考書籍
Apacheクックブック―Webサーバ管理者のためのレシピ集
価格:\2,940(税込)
出版社:オライリージャパン