≡ Menu

Load, Web Server Performance Testing with Apache Bench

If you run a website or blog(WordPress etc) using Apache, you can measure the performance of your site using ApacheBench. ApacheBench is a http load generating tool which will show how many requests per second the server is capable of serving.

ab tool (ApacheBench) comes bundled with the standard Apache source distribution. You can use the shell command line to test your own results with the ApacheBench program.

Type at the command line:

/usr/sbin/ab -n 40 -c 4 http://yahoo.com/

You can see how fast yahoo.com can handle 40 requests, with a maximum of 4 requests running concurrently:

ApacheBench generated the output as follows:

Benchmarking yahoo.com (be patient)…..done

Server Software:
Server Hostname: yahoo.com
Server Port: 80

Document Path: /
Document Length: 141 bytes

Concurrency Level: 4
Time taken for tests: 1.829712 seconds
Complete requests: 40
Failed requests: 7
(Connect: 0, Length: 7, Exceptions: 0)
Write errors: 0
Non-2xx responses: 40
Total transferred: 13205 bytes
HTML transferred: 5633 bytes
Requests per second: 21.86 [#/sec] (mean)
Time per request: 182.971 [ms] (mean)
Time per request: 45.743 [ms] (mean, across all concurrent requests)
Transfer rate: 6.56 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 77 81 5.0 83 107
Processing: 78 85 13.6 84 165
Waiting: 78 84 13.7 83 165
Total: 155 167 15.0 167 249

Percentage of the requests served within a certain time (ms)
50% 167
66% 168
75% 169
80% 170
90% 176
95% 187
98% 249
99% 249
100% 249 (longest request)

This is very useful information, yahoo server delivered over 21.86 page views per second. The fastest request was 249ms, the slowest 155ms.

{ 0 comments… add one }

Leave a Comment