Option at ab linux command for benchmark is described at http://linux.die.net/man/1/ab,
-n number of request -c number of concurrency
for example command to get statistic result on requesting index.html (file size=5937 bytes)
ab -n 1000 -c 1000 http://localhost:8000/ and show the output as follows
My question is the command execute 1000 concurrent process to get the index.html in 1000 times from one nodejs process at the same start time Right ? Why I need to specify -n 1000 ? How to describe the command with -n 1000 and -c 1000 together ? I believe -n option is set just for number of request re-try if previous request is failed for one process request. Right ?
The command output on apache Centos
==================================
Server Hostname: localhost
Server Port: 8000
Document Path: /
Document Length: 5937 bytes
Concurrency Level: 1000
Time taken for tests: 0.725 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 6052000 bytes
HTML transferred: 5937000 bytes
Requests per second: 1378.45 [#/sec] (mean)
Time per request: 725.455 [ms] (mean)
Time per request: 0.725 [ms] (mean, across all concurrent requests)
Transfer rate: 8146.83 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 21 30.0 0 83
Processing: 25 135 74.2 94 286
Waiting: 24 135 74.2 93 286
Total: 54 156 80.3 131 351
Percentage of the requests served within a certain time (ms)
50% 131
66% 227
75% 238
80% 242
90% 257
95% 266
98% 269
99% 272
100% 351 (longest request)