search

Home  >  Q&A  >  body text

Number of concurrencies - In Apache's ab test, how many requests are there for 10 concurrencies?

Using the ab test tool that comes with Apache, how many requests will there be for 10 concurrencies? How is the concurrency calculated? Is it the number of requests in one second or the number of requests within a certain period of time?

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>

This sentence explains that Baidu’s average concurrency is only 8.25?

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

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-05-16 17:05:46

    10 concurrency means 10 requests are sent to the server in an instant. If the server processes it quickly, then continue, but the total number of requests is included in the parameters. In fact, it is to reduce the total number of requests you set to 10 concurrency each time. Go to the server, see how long it takes for the server to finish processing, and calculate the average response per second

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-16 17:05:46

    The number of requests per second you see is very low because many websites will judge your test as a CC-like attack and will deliberately reduce the response or even block your request

    reply
    0
  • Cancelreply