Testing Server Performance Using Apache Benchmark Tool

, , …,

Testing server performance using Apache benchmark tool.

ab -n 9 -c 9 http://example.com/

this will run 9 requests, and 9 concurrent at one time. (note: if you are going to do this multiple times or with lots requests, pick your own server or localhost.)

sample output:

◆ ab -n 9 -c 9 http://example.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking example.com (be patient).....done

Server Software:        ECS
Server Hostname:        example.com
Server Port:            80

Document Path:          /
Document Length:        1270 bytes

Concurrency Level:      9
Time taken for tests:   0.068 seconds
Complete requests:      9
Failed requests:        0
Write errors:           0
Total transferred:      14490 bytes
HTML transferred:       11430 bytes
Requests per second:    131.45 [#/sec] (mean)
Time per request:       68.468 [ms] (mean)
Time per request:       7.608 [ms] (mean, across all concurrent requests)
Transfer rate:          206.67 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       22   31   4.1     33      34
Processing:    24   31   4.5     32      35
Waiting:       23   30   4.2     31      35
Total:         45   62   8.1     65      68

Percentage of the requests served within a certain time (ms)
  50%     64
  66%     67
  75%     67
  80%     67
  90%     68
  95%     68
  98%     68
  99%     68
 100%     68 (longest request)

see man ab.

The tool is installed when you install Apache. See Apache HTTP Server Tutorial.

blog comments powered by Disqus