ApacheBench

ApacheBench (ab) is a single-threaded command line computer program for measuring the performance of HTTP web servers. Originally designed to test the Apache HTTP Server, it is actually generic enough to test any web server.

For single-worker servers, AB can give an idea of the performance that a given server can provide (requests per second, latency). For SMP servers based on several threads or several processes designed to scale on multi-Core CPUs, AB will do the job if many AB instances are run from different client machines. Another tool called Weighttp re-uses AB's syntax and lets you define how many client threads should be involved (sparing the need for many client machines to test SMP servers).

The ab tool comes bundled with the standard Apache source distribution, and like the Apache web server itself, is free, open source software and distributed under the terms of the Apache License.

Contents

Example Usage

ab -n 100 -c 10 http://www.yahoo.com/

This will execute 100 HTTP GET requests, using 10 threads (10 requests per thread) to the specified URL, in this example, "http://www.yahoo.com".

Detecting ApacheBench

The ApacheBench User Agent string is the following:

ApacheBench/MAJOR.MINOR

where MAJOR and MINOR represent the major and minor version numbers of the program. It is usually not correctly categorised by web server log analysers such as Webalizer or AWStats, so running ApacheBench with a great number of requests may skew the results of the reports generated by these programs.

See also

External links