nixCraft Poll

Topics

Measure network performance: Find bandwidth, jitter and datagram loss with iperf utility

Posted by Vivek Gite [Last updated: January 11, 2008]

Typically Windows or Linux desktop users are reporting throughput problems as they see on with their applications:
[a] FTP Transfer

[b] NFS Performance

[c] HTTP Unexpected slow file transfer times etc

As administrators you should able confirm the throughput problem. Use iperf (or other utilities) to find out your:
a) Network throughput problem
b) Packet loss problem
c) Datagram loss
d) Delay jitter

iperf is a tool to measure maximum TCP bandwidth, allowing the tuning of various parameters and UDP characteristics.

iperf works on client / server model. You need to install iperf on both client computer and server computer to measure network performance between two nodes.

So by comparing the reported applications throughput with the measured TCP throughput and the measured available bandwidth, it is possible:
a) To Find out applications problems
b) TCP stack problems
c) Network issues
d) Bandwidth bottleneck problems etc

There is also ttcp program, which is a benchmarking tool for determining TCP and UDP performance between 2 systems.

Install iperf

If you are using Debian / Ubuntu Linux, enter:
$ sudo apt-get install iperf
If you are using FreeBSD, enter:
# cd /usr/ports/benchmarks/iperf
# make install clean

Source code installation for RHEL / CentOS:
# gunzip -c iperf-.tar.gz | tar -xvf -
# cd iperf-
# make; make install

Start iperf on server

To start iperf on server, type the following command:
freebsdbox # /usr/local/bin/iperf -s
Output:

------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------

Test iperf from client

Let us connect to our freebsdbox, enter:
$ iperf -c freebsdbox
Output (note my freebsdbox is on slow vsat link):

------------------------------------------------------------
Client connecting to freebsdbox, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.106 port 40256 connected with 71.zzz.xxx.yyy port 5001
[  3]  0.0-10.7 sec    624 KBytes    480 Kbits/sec

The last line (the red numbers) specifies the speed.

Use UDP rather than TCP

The -u option force to use UDP. The following example run udp test and bandwidth to send at in bits/sec is specified using the -b option:
$ iperf -c rhelbox -u -l 512 -b 10m

Further readings:

Other Recommended Bandwidth Measurement Tools

Apart from iperf, you can also use following tools to evaluate the bandwidth between two points in the network:

  1. Bandwidth Test Controller (BWCTL)
  2. ndt (Network Diagnostic Tool)
  3. Netperf (network performance benchmark)
  4. Thrulay (Improved version)

Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

You may also be interested in other helpful articles:

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Tags: , , , , , , , , , , , , , , , ,

Copyright © 2004-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.