Saturday, November 3, 2012

benchmarking with http_load

Sponsored Links

There are a lot tools are there to benchmark a webserver. One of the useful tool is http_load. It is very simple to use. First you have to download and install http_load. Then test the webserver with urls and different options. With http_load you can run multiple http fetches in parallel to test the performance. It gives you a rough idea of how many bytes a server can serve in a time period.
Install the http_load tool:
wget http://www.acme.com/software/http_load/http_load-12mar2006.tar.gz
tar xvzf http_load-12mar2006.tar.gz
cd http_load-12mar2006
make
make install #if required


Now create a file of urls you want to test.
vi urls.txt
# cat urls.txt
http://www.linuxhelp.in/
http://www.linuxhelp.in/index.html

Now start the test.
./http_load -rate 5 -seconds 5 urls.txt
./http_load -rate 500 -seconds 10 urls.txt
Some points to remember:
parallel – number of requests to open at a time
rate – number of requests to open per second

jitter – vary the rate by about 10%

fetches – quit after this many fetches
seconds – seconds to run the program
Example:
[root@work http_load-12mar2006]# ./http_load -rate 500 -seconds 10 urls.txt
4629 fetches, 435 max parallel, 1.56025e+08 bytes, in 10.0193 seconds
33706 mean bytes/connection
462.007 fetches/sec, 1.55724e+07 bytes/sec
msecs/connect: 271.956 mean, 4062.13 max, 1.98 min
msecs/first-response: 159.822 mean, 5099.23 max, 2.672 min
HTTP response codes:
  code 200 -- 4629
[root@work]#

Recommended Reading

1. Apache Cookbook: Solutions and Examples for Apache Administrators
2. HTTP: The Definitive Guide

Sponsored Links

No comments:

Post a Comment

Be nice. That's all.