How to install and run Apache Benchmark

Install ApacheBench (AB)

apt-get install apache2-utils

Run ApacheBench (AB)

ab -c 100 -n 2000 http://website.com:80/

This test will analyze how website.com handles 2000 requests, with a maximum of 100 requests running concurrently.

Result

Benchmarking website.com (be patient)

Completed 200 requests
Completed 400 requests
Completed 600 requests
Completed 800 requests
Completed 1000 requests
Completed 1200 requests
Completed 1400 requests
Completed 1600 requests
Completed 1800 requests
Completed 2000 requests
Finished 2000 requests
Server Software: nginx
Server Hostname: website.com
Server Port: 80

Document Path: /
Document Length: 18308 bytes

Concurrency Level: 100
Time taken for tests: 98.307 seconds
Complete requests: 2000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 0
Total transferred: 37540000 bytes
HTML transferred: 36616000 bytes
Requests per second: 20.34 [#/sec] (mean)
Time per request: 4915.344 [ms] (mean)
Time per request: 49.153 [ms] (mean, across all concurrent requests)
Transfer rate: 372.92 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 1.3 0 9
Processing: 904 4811 860.8 4611 6793
Waiting: 877 4796 860.9 4597 6780
Total: 908 4811 860.1 4612 6793

Percentage of the requests served within a certain time (ms)
50% 4612
66% 4822
75% 5199
80% 5545
90% 6122
95% 6331
98% 6513
99% 6572
100% 6793 (longest request)

Leave a comment

Your email address will not be published. Required fields are marked *