Wi-Fi: Iperf3 Test
Ping is a great way to test if the hardware is connected to the network, or not, but to really test the network interface it is better to use a program like iperf3
. The program works with a client and a server. The client is typically run on the (u)COM board and the server software can either be installed on a computer on the local network (https://iperf.fr/iperf-download.php) or one of the online servers can be used (https://iperf.fr/iperf-servers.php).
To run the test first start the server by running the program with the -s switch. On a server running Linux the command looks like this:
iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
To improve the performance of iperf3
, run the helper script /opt/ea/optimize_for_iperf3.sh
:
/opt/ea/optimize_for_iperf3.sh
Done with configuration
Run performance test with:
iperf3 -c 192.168.50.2 -i 5 -t 20 -P 4
iperf3 -c bouygues.iperf.fr -i 5 -t 20 -P 4
iperf3 -c ping.online.net -i 5 -t 20 -P 4
iperf3 -c speedtest.serverius.net -p 5002 -i 5 -t 20 -P 4
iperf3 -c iperf.eenet.ee -p 5201 -i 5 -t 20 -P 4
iperf3 -c iperf.volia.net -p 5201 -i 5 -t 20 -P 4
or another server from https://iperf.fr/iperf-servers.php
It will change the CPU frequency governor to performance mode to achieve maximum performance. It will also (for supported M.2 modules) set the minimum power consumption mode, set the driver power management mode to constantly awake, enable frame burst and prevent all scans. The changes are not permanent.
The next step is to run the client on the target hardware:
iperf3 -c 192.168.1.128 -p 5201 -i 1 -P 4
The most important parameter is the URL or IP number of the server, in this case 192.168.1.128 and the port number reported by the server, in this case 5201. There are a lot of options that can be given to the program. Use the --help
option to see them all.
The client prints a lot during the test phase and in the end, it prints a summary like this:
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 8.76 MBytes 7.35 Mbits/sec 1 sender
[ 5] 0.00-10.00 sec 8.67 MBytes 7.27 Mbits/sec receiver
[ 7] 0.00-10.00 sec 10.5 MBytes 8.81 Mbits/sec 1 sender
[ 7] 0.00-10.00 sec 10.2 MBytes 8.54 Mbits/sec receiver
[ 9] 0.00-10.00 sec 8.36 MBytes 7.02 Mbits/sec 4 sender
[ 9] 0.00-10.00 sec 8.20 MBytes 6.88 Mbits/sec receiver
[ 11] 0.00-10.00 sec 8.55 MBytes 7.17 Mbits/sec 1 sender
[ 11] 0.00-10.00 sec 8.47 MBytes 7.11 Mbits/sec receiver
[SUM] 0.00-10.00 sec 36.2 MBytes 30.4 Mbits/sec 7 sender
[SUM] 0.00-10.00 sec 35.5 MBytes 29.8 Mbits/sec receiver
The last two lines display the bandwidth for sending (30.4Mbit/sec) and receiving (29.8Mbit/sec). Note that this number is limited by several factors: max bandwidth of the (u)COM board's CPU, any network switches, network card in the PC and the PC performance. The summary above is from a test against an online server, so the internet connection also limits the speed.