OpenRex: Running Network Performance Test ( iperf / iperf3 )

Iperf is used to test network performance. Iperf3 is a newer version of iperf.

iperf

to install iperf is simple (you have to use Jasbir’s filesystem). Run:

apt-get update
apt-get install iperf

The same way, install iperf on your local machine (you need two computers to run iperf).

With iperf you will need to run two tests. Once run the server on your local machine and client on OpenRex (Server receives / OpenRex sends) and then run client on your local machine and server on OpenRex (OpenRex receives / Server sends). Here are the commands:

# run on server
iperf -s
# run on client
sudo iperf -c SERVER_IP -t 60 -i 10 #e.g. sudo iperf -c 192.168.10.90 -t 60 -i 10

iperf3

this is a new version if iperf. You may need to download and compile if first. Do this on your local computer and OpenRex (you have to use Jasbir’s filesystem):

git clone -b 3.1-STABLE https://github.com/esnet/iperf
cd iperf
./configure
make
make check
sudo make install

Then try:

fedevel@fedevel-VirtualBox:~/iperf$ iperf3 -v
iperf 3.1.3
Linux fedevel-VirtualBox 4.2.0-42-generic #49~14.04.1-Ubuntu SMP Wed Jun 29 20:22:11 UTC 2016 x86_64
Optional features available: CPU affinity setting, IPv6 flow label, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing
fedevel@fedevel-VirtualBox:~/iperf$

If you see “Unable to locate package lib32z1″ error on your local machine, do this:

sudo apt-get install lib32z1

If you see “Unable to locate package lib32z1″ error on OpenRex, do this:

ldconfig /usr/local/lib

This is how it should look when you run it:

On your local machine, run server

iperf3 -s

On your OpenRex run the client

#Server receives / OpenRex sends
root@ubuntu-imx6:~/iperf# iperf3 -c 192.168.0.245 -t 60 -i 10
Connecting to host 192.168.0.245, port 5201
[  4] local 192.168.0.251 port 51350 connected to 192.168.0.245 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-10.00  sec   509 MBytes   427 Mbits/sec  192    918 KBytes
[  4]  10.00-20.00  sec   505 MBytes   424 Mbits/sec  177    551 KBytes
[  4]  20.00-30.00  sec   502 MBytes   422 Mbits/sec   20    378 KBytes
[  4]  30.00-40.00  sec   501 MBytes   420 Mbits/sec    1    433 KBytes
[  4]  40.00-50.00  sec   499 MBytes   418 Mbits/sec   31    434 KBytes
[  4]  50.00-60.00  sec   495 MBytes   415 Mbits/sec    0    574 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-60.00  sec  2.94 GBytes   421 Mbits/sec  421             sender
[  4]   0.00-60.00  sec  2.94 GBytes   421 Mbits/sec                  receiver

iperf Done.
root@ubuntu-imx6:~/iperf#

#OpenRex receives / Server sends
root@ubuntu-imx6:~/iperf# iperf3 -c 192.168.0.245 -t 60 -i 10 -R
Connecting to host 192.168.0.245, port 5201
Reverse mode, remote host 192.168.0.245 is sending
[  4] local 192.168.0.251 port 51354 connected to 192.168.0.245 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   146 MBytes   123 Mbits/sec
[  4]  10.00-20.00  sec   143 MBytes   120 Mbits/sec
[  4]  20.00-30.00  sec   142 MBytes   119 Mbits/sec
[  4]  30.00-40.00  sec   140 MBytes   118 Mbits/sec
[  4]  40.00-50.00  sec   144 MBytes   121 Mbits/sec
[  4]  50.00-60.00  sec   144 MBytes   121 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-60.00  sec   860 MBytes   120 Mbits/sec  27108             sender
[  4]   0.00-60.00  sec   860 MBytes   120 Mbits/sec                  receiver

iperf Done.
root@ubuntu-imx6:~/iperf#