Apache Performance Tuning (Part III/III) – Measuring Apache’s Performance

Tags: abApachebennchmarkinghttperfLinuxmeasuringperformance

Published on: January 4, 2011 by Subin M.

Apache Performance Tuning (Part III/III) – Measuring Apache’s Performance


I will introduce two benchmarking tools which are helpful in Apache performance monitoring : ab & httperf with some other utilities.

1. ab is shipped with most linux distributions. It is used in apache performance monitoring to simulate load test on to your webserver and check how it behaves during such situations. It is run from the command line and the command is ab followed by the required options and the name of a website served by the server that you need to test. There are two ways to which you can run the test. One is to run the ab tool in the same machine where Apache is installed. The sencond is the practical way which is to run the tool to a remote webserver which helps in taking into account the network related accessibility issues. Lets see how to use it.

The most common options of ab are -n and -c. A test to would be as below:

root@sage3-desktop:~# ab -n 100 -c 10

This is ApacheBench, Version 2.3 <$Revision: 655654 $>

Copyright 1996 Adam Twiss, Zeus Technology Ltd,

Licensed to The Apache Software Foundation,

Benchmarking (be patient)…..done

Server Software: gws

Server Hostname:

Server Port: 80

Document Path: /

Document Length: 221 bytes

Concurrency Level: 10

Time taken for tests: 1.455 seconds

Complete requests: 100

Failed requests: 0

Write errors: 0

Non-2xx responses: 100

Total transferred: 83000 bytes

HTML transferred: 22100 bytes

Requests per second: 68.72 [#/sec] (mean)

Time per request: 145.509 [ms] (mean)

Time per request: 14.551 [ms] (mean, across all concurrent requests)

Transfer rate: 55.70 [Kbytes/sec] received

Connection Times (ms)

min mean[+/-sd] median max

Connect: 45 49 3.2 48 62

Processing: 89 94 3.3 94 108

Waiting: 89 94 3.3 93 107

Total: 136 143 5.5 142 170

Percentage of the requests served within a certain time (ms)

50% 142

66% 144

75% 144

80% 145

90% 148

95% 155

98% 166

99% 170

100% 170 (longest request)

-n : Number of requests to perform for the benchmarking session. The default is to just perform a single request which   usually  leads to non-representative benchmarking results.

-c : Number of multiple requests to perform at a time. Default is one request at a time.

Let me explain the options. -n denotes the total number of requests to send to the webserver in the ab session. By specifying -c 10 we ensure that at any instant of the ab session we keep the webserver busy with 10 requests until the total limit of 100 requests is reached. The requests may be sent through a single connection if the server permits KeepAlive and browser supports persistent connections. The main points in performace to note for are: Failed requests, Connection Times & Transfer rate.


2. httperf Usage :

httperf –hog –server –num-conn 50 –rate 10 –timeout 5

-hog : Use as many TCP ports as necessary to generate stats

–server: the host. IP or hostname can be specified

–num-conn : number of connections to create for the session

–rate : create connections at the rate of 10 per second

More simple and direct usage examples can be found at the man page for httperf.

3. Apart from command line tools, there are online websites for available for apache performance monitoring:

4. Page Speed by Google is an open-source project started at Google to help developers optimize their web pages by applying web performance best practices. Page Speed started as an open-source Firefox/Firebug add-on and is now deployed in third-party products such as, Show Slow and Google Webmaster Tools. Please see:

Category : Linux

[easy-social-share counters=0]
Subin M.

Subin M.

Subin loves to dive deep into the engineering aspects of technology and internet in particular. He has indepth knowledge in various webservers and DNS.

You may also read:


Add new commentSIGN IN

Let's Connect


Your Cart

ZPanel migration support for webhosting accounts
Account Migration - ZPanel to ZPanel Migration
Qty: 1
Expert migration team to outsource your Non-Zpanel to ZPanel migrations.
Account Migration – Non-ZPanel to ZPanel
Qty: 1
ZPanel server migration through migration experts.
Server Migration - ZPanel to ZPanel
Qty: 1
server migrations to ZPanel Severs from non-zpanel servers
Server Migration - ZPanel to Non-Zpanel
Qty: 1
Qty: 1
Live Chat Support Team - Sales
Qty: 1
Live Chat Support Team - Billing
Qty: 1
24/7 Sales and Billing support through dedicated sales and billing team
Dedicated Team plan - Sales/Billing
Qty: 1
level2 dedicated night shift support
Dedicated Night Shift Support - Owls
Qty: 1
Shift support for level1 dedicated night shift support
Dedicated Night Shift Support - NightJars
Qty: 1
Four member level3 semi-dedicated technical support team for advanced helpdesk and server adminsitration requirements.
Semi-dedicated Team - Technical - Masters
Qty: 1
level2 semi-dedicated technical support team for dedicated 24/7 server administration and helpdesk support
Semi-dedicated Team- Technical - Abbots
Qty: 1
Choose the number of L1 Soldiers for your team
Qty: 1
Level3 dedicated technical support team for complete hosting support solutions
Dedicated Team - Technical- GrandMasters
Qty: 1
level1 dedicated technical support team
Dedicated Team - Technical -Monks
Qty: 1
Part time graphic designer availability for your custom design requirements
Hire a part time Graphic designer - (4 hours x 22 days)
Qty: 1
A dedicated graphic designer can help you with logo design, website design etc. with high level of professional competency and time bound delivery.
Dedicated Staff - Graphic Designer - (8 hours x 22 days)
Qty: 1
Get a dedicated level3 server administrator for your dedicated server management operations.rver administration and helpdesk support.
Dedicated Staff- Server Admin- Commander
Qty: 1
Dedicated level3E server administrator for escalation support.
Dedicated Staff- Server Admin - Zen Master
Qty: 1
dedicatd level2 server administrrator for sever administration and webhosting support
Dedicated Staff- Server Admin - Warrior
Qty: 1
level1 server administrator for dedicated server administration
Dedicated Staff - Server Admin - Soldier
Qty: 1
VPS node management plan for setting up of VPS node and virtualization assistance.
VPS - Node Management
Qty: 1
VPS live chat for the technical, sales and billing issues for the VPS node and the VPSes hosted on it.
Live Chat - VPS Node
Qty: 1