Measure network performance: Find bandwidth, jitter and datagram loss with iperf utility
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-
# 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:
- iperf project home page
- iperf man page
Other Recommended Bandwidth Measurement Tools
Apart from iperf, you can also use following tools to evaluate the bandwidth between two points in the network:
- Bandwidth Test Controller (BWCTL)
- ndt (Network Diagnostic Tool)
- Netperf (network performance benchmark)
- 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:
- Block outgoing network access for a single user from my server using iptables
- Quick tip: Capture Linux network packets to a file
- Linux display bandwidth usage on network interface by host
- NMAP - Network exploration tool and security / port scanner v4.0 released
- OpenBSD FP Firwall Howto and tutorial
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!
Tags: bandwidth, bwctl, client server model, evaluate bandwidth between two points, find network jitter, find network packet loss, find tcp bandwidth usage, find udp bandwidth usage, iperf_command, maximum tcp, ndt, netperf, network bandwidth, network throughput, tcp window size, thrulay, ttcp



Recent Comments
Yesterday ~ 3 Comments
Yesterday ~ 1 Comment
Yesterday ~ 9 Comments
Yesterday ~ 13 Comments
Yesterday ~ 3 Comments