HTTPing Utility to Measure Webserver performance

Question / Scenario:

How do I measure the performance of a web server over the network.

Answer / Solution:

Use the linux command line utility called httping.

“Httping is like ‘ping’ but for http-requests.
Give it an url, and it’ll show you how long it takes to connect, send a request and retrieve the reply (only the headers). Be aware that the transmission across the network also takes time!” http://www.vanheusden.com/httping/

Installing HTTPing:

HTTPing can be downloaded from http://www.vanheusden.com/httping/

or

Can be installed using yum and the RPMForge repository.

# yum install httping

Using HTTPing:

- g – This selects the url to probe. E.g.: http://localhost/

- p – selects  the  portnumber  to probe.

- l – Connect  using  SSL:  for  this  to  work  you  need  to  give ’https’-url or a 443 portnumber.

- G – Do a GET request instead of a HEAD request. The  complete  page/file  must be transferred.

- b – When this  option  is  used, the transferspeed (in KB/s) is shown

- X – show  the amount of data transferred (excluding the headers)

- c – How many probes to send before exiting

Ping a WebServer:

* Use CTRL + “c” to stop the pinging

$ httping -g http://www.kernelhardware.org
PING www.kernelhardware.org:80 (http://www.kernelhardware.org):
connected to www.kernelhardware.org:80, seq=0 time=535.70 ms
connected to www.kernelhardware.org:80, seq=1 time=428.13 ms
connected to www.kernelhardware.org:80, seq=2 time=431.61 ms
connected to www.kernelhardware.org:80, seq=3 time=444.14 ms
connected to www.kernelhardware.org:80, seq=4 time=639.98 ms
connected to www.kernelhardware.org:80, seq=5 time=5454.97 ms

Ping a Webserver and limit how many pings: (limit to 4 pings )

$ httping -c 4 -g http://www.kernelhardware.org
PING www.kernelhardware.org:80 (http://www.kernelhardware.org):
connected to www.kernelhardware.org:80, seq=0 time=563.43 ms
connected to www.kernelhardware.org:80, seq=1 time=424.66 ms
connected to www.kernelhardware.org:80, seq=2 time=466.69 ms
connected to www.kernelhardware.org:80, seq=3 time=429.26 ms
--- http://www.kernelhardware.org ping statistics ---
4 connects, 4 ok, 0.00% failed

Ping a Webserver and Specify a port: ( specify port 80 )

$ httping -c 4 -p 80 -g http://www.kernelhardware.org

Ping a Webserver and request complete page/file:

The capital “G” sends a GET request rather then a HEAD request. By receiving the entire page/file you can measure the throughput of the webserver. Please note that you should also use the -b option to also get the transfers peed, so you can see the throughput.

$ httping -c 4 -p 80 -G -b -g http://www.kernelhardware.org
PING www.kernelhardware.org:80 (http://www.kernelhardware.org):
connected to www.kernelhardware.org:80, seq=0 time=785.69 ms  127KB/s
connected to www.kernelhardware.org:80, seq=1 time=895.53 ms  109KB/s
connected to www.kernelhardware.org:80, seq=2 time=856.64 ms  111KB/s
connected to www.kernelhardware.org:80, seq=3 time=866.30 ms  128KB/s
--- http://www.kernelhardware.org ping statistics ---
4 connects, 4 ok, 0.00% failed
round-trip min/avg/max = 785.7/851.0/895.5 ms
Transfer speed: min/avg/max = 109/119/128 KB

What do the results mean ?

Defining acceptable latency is not an easy task.  The results you receive from HTTPing are also going to depend on the connection your running HTTPing from.

HTTPing some well known sites and look at the results. How does your web server compare ?

HTTPing is good for when you make changes to your server and want to see what effect those changes had on network performance and latency.

No Comments

Leave a reply