今までそんなに同時アクセス数を考えなくて良いページしか作ってこなかったのだが、ここにきてApacheやらPostgreSQLやらのチューニング方法の知識不足に悩まされ中。
今まで無視してきたApacheのベンチマークツール「ab」を使ってみた。
$ /usr/local/apache2/bin/ab -n 100 -c 10 http://xxxxx/demo/catalog/shopping_cart.php
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> 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/
Benchmarking xxxxx (be patient)…..done
Server Software: Apache/2.0.52
Server Hostname: xxxxx
Server Port: 80
Document Path: /demo/catalog/shopping_cart.php
Document Length: 4113 bytes
Concurrency Level: 10
Time taken for tests: 12.770261 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 465307 bytes
HTML transferred: 415413 bytes
Requests per second: 7.83 [#/sec] (mean)
Time per request: 1277.026 [ms] (mean)
Time per request: 127.703 [ms] (mean, across all concurrent requests)
Transfer rate: 35.55 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 112 133.5 73 533
Processing: 150 1134 902.8 1036 6535
Waiting: 81 1071 915.1 966 6534
Total: 150 1246 900.7 1180 6535
Percentage of the requests served within a certain time (ms)
50% 1180
66% 1191
75% 1197
80% 1218
90% 1704
95% 2435
98% 5366
99% 6535
100% 6535 (longest request)
7.83page/secしか出せないというのはいたい・・・。強烈に痛い。
ちなみにこのページで試したら、1.x page/sec。おぅ、のぉ。
EXPLAINやらJMeterも活躍中。
このページは落ち着いたら追記、書き直しする予定。とりあえずの備忘録。
Popular Posts:
- None Found