并发数 - Apache的ab测试中,10个并发是有多少请求量?
PHP中文网
PHP中文网 2017-05-16 17:03:46
0
2
753

使用Apache自带的ab测试工具,10个并发是会有多少请求量,并发量是怎么算的,是1秒钟的请求数还是多长时间内的请求算并发

D:\wamp\bin\apache\apache2.4.9\bin>ab -n 100 -c 10 http://www.baidu.com/
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 www.baidu.com (be patient).....done


Server Software:        BWS/1.1
Server Hostname:        www.baidu.com
Server Port:            80

Document Path:          /
Document Length:        52980 bytes

Concurrency Level:      10
Time taken for tests:   12.121 seconds
Complete requests:      100
Failed requests:        99
   (Connect: 0, Receive: 0, Length: 99, Exceptions: 0)
Total transferred:      5368249 bytes
HTML transferred:       5300179 bytes
Requests per second:    8.25 [#/sec] (mean)
Time per request:       1212.069 [ms] (mean)
Time per request:       121.207 [ms] (mean, across all concurrent requests)
Transfer rate:          432.52 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       25  119 522.7     27    3103
Processing:    56 1067 1384.7    246    3691
Waiting:       27  207 603.1     84    3157
Total:         87 1186 1431.0    273    3717

Percentage of the requests served within a certain time (ms)
  50%    273
  66%    445
  75%   3268
  80%   3276
  90%   3357
  95%   3457
  98%   3631
  99%   3717
 100%   3717 (longest request)

D:\wamp\bin\apache\apache2.4.9\bin>

这一句说明的是百度的平均并发量只有8.25?

Requests per second:    8.25 [#/sec] (mean)
PHP中文网
PHP中文网

认证0级讲师

全部回复(2)
Ty80

10个并发就是瞬间10个请求到服务器上去,如果服务器处理的快,那么就继续,但是使用参数中有请求总数,其实就是以每次10个并发的方式将你设置的请求总数都压到服务器上去,看服务器多久可以处理完,计算平均每秒的响应情况

我想大声告诉你

你看到的每秒请求数很低,是因为很多网站都会针对你这样的测试判断为类CC攻击,会故意降低响应甚至屏蔽你的请求

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板