Performing an HTTP benchmark with Apache bench (ab)

6 December, 2009 (01:35) | Linux, Web | By: chuck

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.

Notice: All comments are owned by their respective authors. We do not take responsibility for the content of said comments, and reserve the right to remove, edit, or report identifying information to authorities for comments we deem unfit for any reason. If you believe a comment violates United States law, particularly in the case of copyright infringement, please contact the webmaster. Court orders will be required for the release of identifying information/take downs in such cases.

Write a comment