Apache Benchmarking

Apache Benchmarking is a great tool for testing Apache performance on web servers, for example running the following bash command

This will test 1000 connections (-n), limited to 10 concurrent connections (-c) on the website localhost

[root@node1 ~]# ab -n 1000 -c 10 http://localhost/
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests

 

Server Software: Apache/2.4.6
Server Hostname: localhost
Server Port: 80

Document Path: /
Document Length: 4897 bytes

Concurrency Level: 10
Time taken for tests: 0.139 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Non-2xx responses: 1000
Total transferred: 5168000 bytes
HTML transferred: 4897000 bytes
Requests per second: 7185.15 [#/sec] (mean)
Time per request: 1.392 [ms] (mean)
Time per request: 0.139 [ms] (mean, across all concurrent requests)
Transfer rate: 36262.54 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 1
Processing: 1 1 0.4 1 5
Waiting: 1 1 0.5 1 5
Total: 1 1 0.4 1 5

Percentage of the requests served within a certain time (ms)
50% 1
66% 1
75% 1
80% 1
90% 2
95% 2
98% 2
99% 4
100% 5 (longest request)

Leave a comment