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
相关文章
相关标签/搜索