並發數 - Apache的ab測試中,10個並發是有多少請求量?
PHP中文网
PHP中文网 2017-05-16 17:03:46
0
2
807

使用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攻擊,會故意降低迴應甚至封鎖你的請求

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板