[How To] Check Network Performance with iperf3

Sometimes it is important to check the network performance between your OSMC Device and the device providing your media (NAS, Server, PC). Especially when you are connected via wireless the throughput variations can harm you viewing experience.
This short How To should give you the required information how to install iperf3 and how to run the respective tests. When doing these tests it is suggested to have a simple setup (single switch between Sender and Receiver and avoid other traffic on the LAN. Also if you want help please post full results including the used command line.

  1. Install it on the OSMC device with sudo apt-get install iperf3

  2. Install it on your other device in your LAN (NAS, Server, Router or PC) following the respective method from here iPerf - Download iPerf3 and original iPerf pre-compiled binaries

After we have installed it on both devices we can run the test:

  1. Start iperf3 in server mode on your central device (NAS, Server, Router or PC) with iperf3 -s

  2. Start iperf3 on the OSMC as client with iperf3 -R -c <IP of your iperf3-server>, this will run a test where the OSMC device will receive data from the Server

  3. Now to test the direction from OSMC to the Server we need to remove -R switch on the OSMC device iperf3 -c <IP of your iperf3-server>

While the -R test is the more relevant one (you normally use the direction where the OSMC device receives the data) it still also important to run the test without the -R option to ensure both receiving and transmission direction works fine.

This initial test should give you an idea if your connection works fine, depending on your connectivity you should see:
Wired 100 Mbit: upto 94 Mbits/sec
Wired 1000 Mbit (both sides): upto 940 Mbits/sec
Wireless (2.4 Ghz): ~20-50 Mbits/sec
Wireless (5 GHz): 60-140 Mbits/sec

Please, be aware that Gigabit Ethernet Chips on some devices like the Raspberry Pi3+ are internally limited due to their connection (e.g. USB2) and therefore bandwidths up to 940 Mbits/sec cannot be reached with these…

If you find any major discrepancies you should look at changing cable, ports or switches. If you connect by wireless than try to change the channel.
Retries are not of major concern (if numbers are reasonably low) as the only time you would get zero retries is if the receiver and every link in the chain is faster than the sender. Especially when wireless is involved retries are common.

For further testing you could either extend the testing with -t 60 (one minute)
iperf3 -t 60 -R -c <IP of your iperf3-server>
or try parallel stream -P 4 which can make sense on wireless
iperf3 -P 4 -R -c <IP of your iperf3-server>
or you can use udp packets instead of tcp -u (you need to define the stream speed with -b eg. -b 100M or -b 1000M)
iperf3 -u -b 100M -R -c <IP of your iperf3-server>

7 Likes
sudo apt-get remove iperf3 libiperf0

What did you try to indicate/solved with that?

1 Like

Ooh, I’m terribly sorry.
I was in the middle of creating that post and probably went on with other things and forgot about this.

What I was about to add was a way to delete the installed iperf program.
Just for peeps who tend to tidy things up after they’re done with it. :wink:

Perhaps add this last command in the How To?

It uses such little space that typing that command already takes more effort than the space it takes. Anyhow people now can find it in your comment

2 Likes

Thanks for this guide.
My Vero 4K is connected to WD Mycloud mirror NAS.
And I would like to know, maybe somebody of OSMC comunity using WD company NAS and know how to instal iperf3 on it.

Doesn’t support 3rd party apps so no chance to run iperf3 on it. Suggest to test iperf3 against other devices (like your PC).

Thanks

This is a great guide and was really useful thanks. Wish I could figure out how to test also on a CCwGTV. I installed Analiti which apparently has iperf but couldn’t figure out how to test between OSMC and/or other servers

Regarding Synology NAS devices: My DS223 with DSM 7.2 comes with a hidden useful diagnosis package which can be activated/installed via ssh:

sudo synogear install

It contains the following packages including iperf3:

autojump autojump_match.py cifsiostat domain_test.sh file fix_idmap.sh iftop iostat iotop iperf iperf3 log-analyzer.sh lsof mpstat ncat nethogs nmap nping perf-check.py pidstat sa1 sa2 sadc sadf sar sid2ugid.sh sockstat speedtest-cli.py sysstat tcpdump tcpdump_wrapper tmux update_check.py zblacklist zmap ztee

1 Like

I have DS218+ on DSM7.1.1 and you can install SynoCli Monitor Tools from the Package Centre.
SynoCli Monitor Tools provides a set of command-line utilities for system monitoring includes:
nmon, njmon, iperf2, iperf3, htop, ionice, cpulimit, net-snmp tools, and process utilities (lsof, iostat, pgrep, pmap, watch), bandwhich, bottom, procs.

1 Like