2010年3月4日 星期四

apache 壓力測試結果.

ab -c 30 -t 60 http://www.xxx.com:80/index.php
第1次測試 1分鐘內 30個人同時連線. 


Server Software:        Apache/2.2.8
Server Hostname:        www.XXX.com
Server Port:            80

Document Path:          /index.php
Document Length:        28729 bytes

Concurrency Level:      30 #表示同時間 30個連線
Time taken for tests:   60.325 seconds #跑了60秒
Complete requests:      1038 #完成了 1038 連線請求
Failed requests:        0
Write errors:           0
Total transferred:      29974588 bytes
HTML transferred:       29832245 bytes
Requests per second:    17.21 [#/sec] (mean) #表示在30個人同時連線的情況下,還可以保持每秒17個request。 
Time per request:       1743.497 [ms] (mean) #平均每個人瀏覽首頁約1.7秒
Time per request:       58.117 [ms] (mean, across all concurrent requests)
Transfer rate:          485.24 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    2   2.5      1      67
Processing:  1023 1701 812.0   1452    9868
Waiting:     1018 1696 812.0   1446    9863
Total:       1024 1703 812.0   1455    9869

Percentage of the requests served within a certain time (ms)
  50%   1455
  66%   1595
  75%   1719
  80%   1866
  90%   2222  # 30*90%=27 人 感覺瀏覽網站在2.2秒內
  95%   3945
  98%   4664
  99%   4953
 100%   9869 (longest request)


ab -c 100 -t 600 http://www.xxx.com:80/index.php
第2次測試 10分鐘內 100個人同時連線. 
Server Software:        Apache/2.2.8
Server Hostname:        www.XXX.com
Server Port:            80

Document Path:          /index.php
Document Length:        28729 bytes

Concurrency Level:      100 #表示同時間 100個連線
Time taken for tests:   600.002 seconds #跑了600秒
Complete requests:      15765 #完成了 15765 連線請
Failed requests:        0
Write errors:           0
Total transferred:      455072490 bytes
HTML transferred:       452912685 bytes
Requests per second:    26.27 [#/sec] (mean) #表示在100個人同時連線的情況下,還可以保持每秒26個request。 
Time per request:       3805.912 [ms] (mean) #平均每個人瀏覽首頁約3.8秒
Time per request:       38.059 [ms] (mean, across all concurrent requests)
Transfer rate:          740.68 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    4  75.4      2    3004
Processing:  1325 3787 2067.0   2736   23791
Waiting:     1321 3741 2014.2   2723   23780
Total:       1327 3791 2070.9   2738   23794

Percentage of the requests served within a certain time (ms)
  50%   2738
  66%   3624 
  75%   5076 #100*7%= 75 人 感覺瀏覽網站在5 秒內
  80%   5479
  90%   6580
  95%   7942
  98%   9448
  99%  11344
 100%  23794 (longest request)

【下列文章您可能也有興趣】

沒有留言: