ApacheBench
Encyclopedia
ApacheBench is a single-threaded command line computer program for measuring the performance
of HTTP
web server
s. 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
.
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" .
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.
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:...
of HTTP
Hypertext Transfer Protocol
The Hypertext Transfer Protocol is a networking protocol for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web....
web server
Web server
Web server can refer to either the hardware or the software that helps to deliver content that can be accessed through the Internet....
s. Originally designed to test the Apache HTTP Server
Apache HTTP Server
The Apache HTTP Server, commonly referred to as Apache , is web server software notable for playing a key role in the initial growth of the World Wide Web. In 2009 it became the first web server software to surpass the 100 million website milestone...
, 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
SMP
-In technology:* Shape memory polymers, in the field of chemical engineering.* Simulation Model Portability: A standard developed by ESA and ECSS for space mission simulators....
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
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...
software and distributed under the terms of the Apache License
Apache License
The Apache License is a copyfree free software license authored by the Apache Software Foundation . The Apache License requires preservation of the copyright notice and disclaimer....
.
Example Usage
This will execute 100 HTTP GET requests, using 10 threads (10 requests per thread) to the specified URL, in this example,
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
Webalizer
The Webalizer is a GPL application that generates web pages of analysis, from access and usage logs, i.e. it is web log analysis software. It is one of the most commonly used web server administration tools. It was initiated by Bradford L. Barrett in 1997. Statistics commonly reported by Webalizer...
or AWStats
AWStats
AWStats is an open source Web analytics reporting tool, suitable for analyzing data from Internet services such as web, streaming media, mail and FTP servers. AWStats parses and analyzes server log files, producing HTML reports. Data is visually presented within reports by tables and bar graphs...
, so running ApacheBench with a great number of requests may skew the results of the reports generated by these programs.