iperf
- iperf (short for “IP performance”) is a client/server throughput (bandwidth) measurement tool
- iperf uses a TCP-connection (by default) to sent traffic at maximum possible speed and measuring the capacity (troughput or bandwidth) of the connection.
This is similar to a file-download (or upload) and calculating the bandwith by dividing the file-size by the copy duration. - Advantages of iperf (compared to a file-copy):
- no need to create a large file and manual copying
- bandwidth calculation is automatic and is shown at certain intervals (configurable)
- test upload and download sequentially or concurrently
- test upload and download with multiple parallel channels
Example
Example of a Windows client and a server on a 100 Mbps LAN :
Note that 94 Mbps is the maximum TCP-performance that you can expect on a 100 Mbps Ethernet connection, because you loose approximately 6% of bandwidth due to protocol and header overhead.
To put it this way: Layer-4 (TCP) bandwidth = 94% of Layer-2 (Ethernet) bandwidth
Technically:
- layer-4 (TCP) bandwidth is called “throughput”,
that is including protocol-overhead, transmit delays and retransmissions due to packet-loss. - layer-2 (Ethernet) bandwidth is the “line-speed” (eg. 10/100/1000Mbps)
Download iperf for Windows
- Save this file: iperf-1.7.0-win32.exe.bin
- Rename to .exe
Check the MD5-checksum if you want to verify the file integrity:
md5sum iperf-1.7.0-win32.exe 624b6717901c90f3ca254f2f91ab15f3 iperf-1.7.0-win32.exe
iperf info
- Wikipedia → Iperf
- original iperf page → http://dast.nlanr.net/Projects/Iperf/
- original iperf docs → http://dast.nlanr.net/Projects/Iperf/iperfdocs_1.7.0.php
- local copy of “iperf v2.0.0 User docs”
→ http://john.de-graaff.net/docs/iperf_user_docs_v2.0.0/ - local copy of iperf source code (debian-4.0)
→ http://john.de-graaff.net/docs/iperf_2.0.2.orig.tar.gz - Linux Redhat packages → http://dag.wieers.com/packages/iperf/
- Linux Debian packages → http://packages.debian.org/etch/iperf
- graphical frontend jperf → http://code.google.com/p/xjperf/
- other informational page on iperf → http://openmaniak.com/iperf.php
iperf usage
Typical usage server-side:
iperf -s -w64000 -i1
Typical usage client-side:
iperf -c 12.12.1.1 -w64000 -i1 -t5 -r
Options:
-s Server mode (listening)
-c <ip> Client mode, connect to <ip>
-i 1 Display speed each 1 second
-m Display MSS and MTU (when done)
-w 64k Change TCP Windows size (helps on Windows hosts)
-t 4 Run 4 secs instead of default 10 sec
-r do Reverse: first push Client->Server,
then pull Client<-Server
(use to test symmetricy bandwidth and duplex mismatches)
-d do Dual: push and pull at the same time
(test full-duplex)
-P 4 use 4 channels parallel (default 1) (note: 'P' is capital)
Notes
- iperf default TCP-port is 5001
- TCP-connection (SYN) is “client → server”
- Stream is “client → server”, so data-PUSH from client→server.
So from client perspective this is upload bandwidth!
(use -r to test sequentially upload and then download) - Info on Duplex Mismatch

