ApacheBench

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

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.

Example usage

ab -n 100 -c 10 "http://en.wikipedia.org/wiki/Main_Page"

This will execute 100 HTTP GET requests, processing up to 10 requests concurrently, to the specified URL, in this example, "http://en.wikipedia.org/wiki/Main_Page".[2]

Concurrency versus Threads

Note that ApacheBench will only use one operating system thread regardless of the concurrency level (specified by the -c parameter). In some cases, especially when benchmarking high-capacity servers, a single instance of ApacheBench can itself be a bottleneck. When using ApacheBench on hardware with multiple processor cores, additional instances of ApacheBench may be used in parallel to more fully saturate the target URL.

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.[3] 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

References

  1. "ab - Apache HTTP server benchmarking tool". Apache. Retrieved 9 October 2014.
  2. "Using Apache Bench for Simple Load Testing". Pete Freitag's ColdFusion, Java and Web Development Blog. Retrieved 9 October 2014.
  3. "Useragent detail: AB (Apache Bench)". User-Agent-String-Info. Retrieved 9 October 2014.

External links


This article is issued from Wikipedia - version of the 4/5/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.