Performing an HTTP benchmark with Apache bench (ab)

ab (apache bench) is a command line program that comes with apache by default in most distributions. It allows one to run a quick and efficient test of how a server can handle a heavy load of clients.

To use it simply run (as root)

ab -n number_of_requests_to_try http://www.websiteyouwanttobenchmark.com/

Note that the trailing / is necessary for ab to function. Once run it will produce a easy to read status report showing how fast your server responded to the requests. From there you can optimize your webserver to handle the requests more efficiently, all without having to resort to changing variables in the dark.

Leave a Reply