B
B
beduin012017-09-01 12:27:43
Software testing
beduin01, 2017-09-01 12:27:43

Why does apache benchmark work so fast?

I'm trying to test my site with apache benchmark. I execute the following command:

[email protected]:~# ab -c 10 -n 1000 -t 60 http://127.0.0.1:8082/

`-t 60` means, according to the documentation, that the test should take 60 seconds, but everything works out for me in about 15 seconds. Then the result is displayed. What am I doing wrong?
Concurrency Level:      10
Time taken for tests:   20.123 seconds
Complete requests:      50000
Failed requests:        40016
   (Connect: 0, Receive: 0, Length: 40016, Exceptions: 0)
Total transferred:      206755999 bytes
HTML transferred:       200855999 bytes
Requests per second:    2484.75 [#/sec] (mean)
Time per request:       4.025 [ms] (mean)
Time per request:       0.402 [ms] (mean, across all concurrent requests)
Transfer rate:          10033.93 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.7      0      11
Processing:     0    4   2.8      2      18
Waiting:        0    4   2.8      2      18
Total:          0    4   2.8      2      18

Percentage of the requests served within a certain time (ms)
  50%      2
  66%      7
  75%      7
  80%      7
  90%      8
  95%      8
  98%      9
  99%     10
 100%     18 (longest request)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2017-09-01
@melkij

Maximum number of seconds to spend for benchmarking. This implies a -n 50000 internally.

Max != total duration of the test.
https://httpd.apache.org/docs/2.4/programs/ab.html
Read the descriptions of the options carefully.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question