install apache benchmarking tool – ‘ab’

On WINDOWS machine :

Download httpd-****-x86 from http://httpd.apache.org/download.cgi

After going through the installation process –> Go to the directory where its installed

similar to C:\httpd-2.4.12-x86\Apache24\bin in my case, add this to system ENV Variable

 

On UNIX machine :

did not work –>> sudo yum install httpd-tools

Below long procedure worked, and it also needed to switch to root user and running it, running command with sudo did not work

You will need to install apr-utils and yum-utils first.

yum -y install apr-util
yum -y install yum-utils

 

extract Apache Benchmark from httpd-tools. And here is how.

mkdir ~/httpd-tools

cd ~/httpd-tools

yumdownloader httpd-tools

 

Now extract ab (Apache Benchmark) and move it to  /usr/bin  folder

rpm2cpio httpd-tools-2.2.24-1.29.amzn1.x86_64.rpm | cpio -idmv

mv usr/bin/ab /usr/bin/ab

cd ~

rm -rf ~/httpd-tools

 

 

sample command to test with –

ab -ki -n 500000 -c 200 http://rusticode.com/2013/04/07/lannn-installing-apache-benchmark-on-centos-ec2-linux-ami-with-nginx/

-n    specifies the number of requests,

-c    number of concurrent connections,

-k    stands for HTTP Keep-Alive,  

-t    maximum time of awaiting for response from connection

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s