Measure Web Server Performance with Apache Benchmark

There are many tools that can be used to measure the performance of web servers, one of them is using the web stress tool for windows. But we can also use the Apache Benchmark from the Apache HTTP Server, one of the web server that is widely used on the internet.

Apache Benchmark is a tool to measure the performance of Apache, with Apache Benchmark we can see the capabilities of Apache to serve the client request. But the question is where we can download Apache benchmark and how to install it.

Apache Benchmark has been installed automatically when installing the Apache HTTP Server, if apache is already installed then this benchmarking tool is automatically there. Apache Benchmark tool location is typically in-directory. Apache benchmark tool can be used not only for Apache, but for other web servers as well as Lighthttpd, Nginx or Microsoft IIS.

How to use the AB is as follows:

# Ab-c 1000-n 1000 ‘′

– The parameter c is the number of concurrent requests made, with the example above means the number of requests that are made is 1000 requests at a time.

– The parameter n is the number of connections made to the destination server, with the example above means that the connection was made is 1000 connections. This Apache Benchmark consume server resources, ranging from memory (RAM), bandwidth and processor. Enter the number of connections and concurrent requests that are appropriate, so the web server does not run out of resources and then hangs.

– The last parameter is the URL, the page will be processed by the web server on-benchmark.

Sample benchmark results as follows:
[Root @ william-duff] # / usr/local/apache2/bin/ab-c 1000-n 1000 ‘′
This is ApacheBench, Version 2.3 <$ Revision: $ 655,654>
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
Licensed to the Apache Software Foundation, Benchmarking (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests

Finished 1000 requests

Server Software: Apache/2.2.11
Server Hostname:

Server Port: 80

Document Path: / williamtest/comment/get_data/20/10
Document Length: 8407 bytes

Concurrency Level: 1000
Time taken for tests: 53,292 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total Transferred: 8621000 bytes
HTML Transferred: 8407000 bytes
Requests per second: 18.76 [# / sec] (mean)
Time per request: 53291.611 [ms] (mean)
Time per request: 53 292 [ms] (mean, across all concurrent requests)
Transfer rate: 157.98 [Kbytes / sec] received Connection Times (ms)
min mean [+ /-sd] median max
Connect: 1 101 20.4 103 132
Processing: 87 15912 17447.4 53 159 7328
Waiting: 87 15909 17447.3 53 159 7326

Total: 88 16014 17458.6 7441 5329

Percentage of the requests served Within a perform certain time (ms)
50% 7441
66% 14 105
75% 26 339
80% 26 871
90% 51 923
95% 52 661
98% 52 947
99% 53 134

100% 53 290 (Longest request)

Time per request, means that the server is able to serve 18.76 requests per second for URLs that are benchmarks. Apache benchmark is a pretty good tool, the results are quite informative. Apache benchmark can be used to complete the benchmark results that are used with other tools.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>