apache ab壓力測試 併發測試

使用的是win7 64位系統環境  環境包wampserver 64位php

 

D:\wamp\bin\apache\apache2.4.9\bin\ab.exehtml

cmd下進入到bin目錄apache

 

查看是否安裝 .\ab -V     (V 大寫)併發

 

 

測試結果 -n 1000次請求  -c 併發用戶數測試

D:\wamp\bin\apache\apache2.4.9\bin>.\ab -n1000 -c100 http://xuechao2010.gicp.net
:8989/index.php
This is ApacheBench, Version 2.3 <$Revision: 1554214 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking xuechao2010.gicp.net (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache/2.4.9
Server Hostname:        xuechao2010.gicp.net
Server Port:            8989

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

Concurrency Level:      100
Time taken for tests:   32.229 seconds
Complete requests:      1000
Failed requests:        6
   (Connect: 0, Receive: 0, Length: 6, Exceptions: 0)
Non-2xx responses:      3
Total transferred:      4723937 bytes
HTML transferred:       4381787 bytes
Requests per second:    31.03 [#/sec] (mean)
Time per request:       3222.942 [ms] (mean)
Time per request:       32.229 [ms] (mean, across all concurrent requests)
Transfer rate:          143.14 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    2   1.1      2      17
Processing:  1137 2631 565.4   2595    7974
Waiting:     1137 2614 493.1   2590    4072
Total:       1138 2633 565.4   2597    7976

Percentage of the requests served within a certain time (ms)
  50%   2597
  66%   2809
  75%   2948
  80%   3022
  90%   3292
  95%   3465
  98%   3772
  99%   3900
 100%   7976 (longest request)

 

重要的部分.net

Requests per second:    31.03 [#/sec] (mean)  在100個併發用戶下 一秒能處理的請求數位31.03

100併發和1000併發下的對比

參考資料http://www.cnblogs.com/luckyliu/archive/2012/03/04/2379306.htmlhttp://zzk.cnblogs.com/s?w=AB%E6%B5%8B%E8%AF%95&t=b
相關文章
相關標籤/搜索