ab command and its examples

It stands for “ApacheBench,” which is used to benchmark the performance of web servers. It is part of the Apache HTTP and is made available on Linux systems.

It sends a specified number of requests to a web server to measure the server’s response time and other performance metrics. Which can be helpful in determining how well a web server performs under different loads and conditions

  • Comes From : httpd-tools-2.2.15

Examples:

1. To do a performance benchmarking of your web site, by sending 10 number of requests

$ ab -n 10 http://192.168.27.128/index.html

2. To increase the verbosity level

$ ab -n 10 -vv http://192.168.27.128/index.html
$ ab -n 10 -vvv http://192.168.27.128/index.html

3. To do HEAD requests instead of GET

$ ab -n 10 -i http://192.168.27.128/index.html

4. To give number of concurrent requests

$ ab -n 100 -c 20 http://192.168.27.128/index.html

5. To not to display “percentage served within XX [ms] table”

$ ab -n 100 -c 20 -d http://192.168.27.128/index.html

Leave a Reply

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