How to measure Network Throughput using iperf ?

iPerf3 is a tool for active measurements of the maximum achievable bandwidth on IP networks. It supports tuning of various parameters related to timing, buffers and protocols (TCP, UDP, SCTP with IPv4 and IPv6). For each test it reports the bandwidth, loss, and other parameters. 

In this post, we will demo the steps required for testing network throughput on ARM based BeagleBoard. This steps should work for any embedded platform.

Cross Compile Iperf for ARM

 $ git clone https://github.com/esnet/iperf.git
$ cd iperf/

Assuming toolchain is located at /home/devlab/devlab/linaro/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf

$ export PATH=$PATH:/home/devlab/devlab/linaro/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin
$ mkdir out
$ ./configure --host=arm-linux-gnueabihf --prefix=/home/devlab/devlab/iperf/out
$ make
$ make install

* copy ./out/bin/iperf to /usr/local/bin of BeagleBoard(ARM platform) RFS.

On linux host

$ iperf -s

————————————————————

Server listening on TCP port 5001

TCP window size: 85.3 KByte (default)

————————————————————

[  4] local 192.168.0.200 port 5001 connected with 192.168.0.202 port 51887

connect failed: Connection refused

[ ID] Interval       Transfer     Bandwidth

[  4]  0.0-10.0 sec    222 MBytes    186 Mbits/sec

On BeagleBoard

root@beagleboard:~# iperf -c 192.168.0.200 -d

————————————————————

Client connecting to 192.168.0.200, TCP port 5001

TCP window size: 35.2 KByte (default)

————————————————————

[  3] local 192.168.0.202 port 51887 connected with 192.168.0.200 port 5001

————————————————————

Server listening on TCP port 5001

TCP window size: 85.3 KByte (default)

————————————————————

Waiting for server threads to complete. Interrupt again to force quit.

[ ID] Interval       Transfer     Bandwidth

[  3]  0.0-10.0 sec    222 MBytes    186 Mbits/sec

root@beagleboard:~#

Reference’s:

http://openmaniak.com/iperf.php

http://unixfoo.blogspot.com/2009/02/iperf-network-throughput-measurement.html

Leave a Comment