ApacheBench (ab is the real program file name) is a single-threaded command line computer program used for benchmarking (measuring the performance of) HTTP web servers.[1] 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

edit

The original program was named zb "ZeusBench V1.0" and it was written by Adam Twiss (Zeus Technology), in 1996, in order to test performance of Zeus Web Server. 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.[2]

Example usage

edit
ab -n 10000 -c 10 "http://localhost/index.html"

This will execute 10000 HTTP GET 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.[3]

For an extended example of ab output see also ab output for Squid performance tuning.

Concurrency versus threads

edit

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

edit

The ApacheBench User Agent string is ApacheBench/MAJOR.MINOR where MAJOR and MINOR represent the major and minor version numbers of the program.[4] 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

edit

References

edit
  1. ^ "ab - Apache HTTP server benchmarking tool". Apache. Retrieved 9 October 2014.
  2. ^ "Apache HTTP Server: ab source code, comments". Apache: HTTPd server project. 2021. Retrieved 2021-12-20.
  3. ^ "Using Apache Bench for Simple Load Testing". Pete Freitag's ColdFusion, Java and Web Development Blog. Retrieved 9 October 2014.
  4. ^ "User-agent detail: AB (Apache Bench) output". User-Agent-String-Info. Retrieved 9 October 2014.
edit

📚 Artikel Terkait di Wikipedia

AB

of electric amplifier Category of abelian groups (Ab), in mathematics ApacheBench, a command line tool for Apache HTTP Server Alabamine, a former name

Apache HTTP Server

developers. Free and open-source software portal .htaccess .htpasswd ApacheBench Comparison of web server software IBM HTTP Server LAMP (software bundle)

Zeus Technology

by a renaming from 'ZXTM' to 'Zeus Traffic Manager'.[citation needed] ApacheBench, the benchmarking tool bundled with Apache HTTP Server, was originally

Web server benchmarking

tools such as: Apache JMeter, an open-source Java load testing tool ApacheBench (or ab), a command line program bundled with Apache HTTP Server Siege

Mobile Web Server

Apache Tomcat, alternative open source web server and servlet container ApacheBench, a program for measuring the performance of HTTP web servers Nokia Press

Zeus Web Server

IIS and Sun Java System Web Server. Comparison of web server software ApacheBench program derived from original ZeusBench used to benchmark performance

Internet application management

can be achieved through first creating benchmarks using tools such as Apachebench or J-Meter through load simulation.[citation needed] The output of load