ApacheBench
   HOME

TheInfoList



OR:

ApacheBench (ab is the real
program Program, programme, programmer, or programming may refer to: Business and management * Program management, the process of managing several related projects * Time management * Program, a part of planning Arts and entertainment Audio * Progra ...
file name A filename or file name is a name used to uniquely identify a computer file in a directory structure. Different file systems impose different restrictions on filename lengths. A filename may (depending on the file system) include: * name &ndas ...
) is a single-threaded command line computer program used for benchmarking (measuring the performance of)
HTTP The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide We ...
web servers. Originally it was used to test the Apache HTTP Server but it is generic enough to test any web server supporting HTTP/1.0 or HTTP/1.1 protocol versions. The ab tool is written in C and it 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.


History

The original program was named zb "ZeusBench V1.0" and it was written by Adam Twiss (
Zeus Technology Zeus Technology, Ltd. was a software company founded in 1995 and based in Cambridge, England, known for its web server. In July 2011, Zeus Technology was acquired by Riverbed Technology. In March 2015, Riverbed Technology sold the SteelApp busi ...
), in 1996, in order to test performance of
Zeus Web Server Zeus Web Server is a discontinued proprietary high-performance web server for Unix and Unix-like platforms (including Solaris, FreeBSD, HP-UX and Linux). It was developed by Zeus Technology, a software company located in Cambridge, England that ...
. Soon later Twiss licensed (donated) that program to the Apache Group so that the derived program was renamed ab "ApacheBench". Since 1997, 1998 ab has been further developed and maintained, as a support program included in Apache HTTP server, from version 1.0 (1997,1998) to version 2.3 (2021) and later. Excerpt from comments about copyright attributions found in source code of ab program.
 /*
    ** This program is based on ZeusBench V1.0 written by Adam Twiss
    ** which is Copyright (c) 1996 by Zeus Technology Ltd. http://www.zeustech.net/
                    .
                    .
                    .
    **
  */

 /*
    ** HISTORY:
    **    - Originally written by Adam Twiss , March 1996
    **      with input from Mike Belshe  and
    **      Michael Campanella 
    **    - Enhanced by Dean Gaudet , November 1997
    **    - Cleaned up by Ralf S. Engelschall , March 1998
    **    - POST and verbosity by Kurt Sussman , August 1998
    **    - HTML table output added by David N. Welton , January 1999
    **    - Added Cookie, Arbitrary header and auth support. , April 1999
    ** Version 1.3d
                    .
                    .
                    .
    ** Version 2.3
                    .
                    .
                    .
    **/


Example usage

ab -n 10000 -c 10 "http://localhost/index.html" This will execute 10000
HTTP GET The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, w ...
requests, processing up to 10 requests concurrently, to the specified URL, in this example, http://localhost/index.html which requires that a web server is running on port 80 of the same computer where ab is run. For an extended example of ab output see also ab output for Squid performance tuning.


Concurrency versus threads

Note that ApacheBench will only use one
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also i ...
thread regardless of the concurrency level (specified by the 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 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 The Webalizer is web log analysis software, which generates web pages of analysis, from access and usage logs. It is one of the most commonly used web server administration tools. It was initiated by Bradford L. Barrett in 1997. Statistics common ...
or
AWStats AWStats (Advanced Web Statistics) is an Open-source software, open source Web analytics reporting tool, suitable for analyzing Server log, data from Internet services such as web server, web, streaming media, mail server, mail, and File Transfer P ...
, so running ApacheBench with a great number of requests may skew the results of the reports generated by these programs.


See also

* Internet Application Management *
Web server benchmarking Web server benchmarking is the process of estimating a web server performance in order to find if the server can serve sufficiently high workload. Key parameters The performance is usually measured in terms of: *Number of requests that can be se ...


References

{{Reflist


External links


Manual page for the 'ab' tool

Apache HTTPD official website
Apache Software Foundation Load testing tools