The correct way to benchmark your network

  • Ever tried to measure the network speed between two computers?
  • Do you want to know how fast your local network is?
  • Would you like to compare your WiFi and ethernet speeds?
  • Do you want to check for faulty cables?

You can do all of the above, and more, with iperf3.

As the devolpers state at the official website :

The iperf series of tools perform active measurements to determine the maximum achievable bandwidth on IP networks. It supports tuning of various parameters related to timing, protocols, and buffers. For each test it reports the measured throughput, loss, and other parameters.

iperf3 is a powerful tool that can be used to benchmark the performance of local network computers. It allows you to measure the bandwidth and latency of a network connection between two devices. This can be useful for identifying bottlenecks and troubleshooting network issues.

To use iperf3, you will need to have it installed on both the client and server computers. Once installed, you can run the following commands to start the benchmarking process.

On the server computer, open a command prompt and type “iperf3 -s”. This will start the iperf3 server and listen for incoming connections.

On the client computer, open a command prompt and type “iperf3 -c [server IP]”. Replace [server IP] with the IP address of the server computer. This will connect the client to the server and begin the benchmarking process.

By default, iperf3 will perform a test for 10 seconds and provide the results in a summary. However, you can specify a longer test duration or change other settings using command line options. For example, you can use the -t option to specify the test duration in seconds, and the -w option to specify the TCP window size.

Once the test is complete, you will see the results displayed on the client computer. These results will include the bandwidth and latency of the connection, as well as any errors that occurred during the test.

In addition to the basic test, iperf3 also supports various advanced options such as parallel streams, bidirectional tests, and more. It is a great tool for network administrators and developers to check the performance of their network.

In conclusion, iperf3 is a powerful and easy-to-use tool for benchmarking the performance of local network computers. It allows you to measure the bandwidth and latency of a network connection, and provides detailed results that can be used to identify and troubleshoot network issues.

First, install iperf3 for your operating system, do that in every computer you want to benchmark.

Archlinux

sudo pacman -S iperf3

macOS

brew install iperf3

Ubuntu/Debian

apt get install iperf3

Windows

scoop install iperf3

Synology NAS

Install SynoCli Monitor Tools from the SynoCommunity website

Real-life tests

We will use the Synology NAS as the server and run tests across some local machines acting as clients. Synology NAS has two network interfaces:

  • LAN Gigabit Ethernet (builtin, attached to gigabit switch)
  • Wi-fi with a TP-LINK TL-WN722N dongle

MacbookAir M2

OS : macOS Sonoma 14.2.1
Network : 1000 baseT full duplex, 1500 MTU

Testing the WiFi connection with the MacbookAir M2 (Wi-Fi 6 - 802.11ax)

Connecting to host 192.168.3.2, port 5201
[  6] local 192.168.3.6 port 61884 connected to 192.168.3.2 port 5201
[ ID] Interval           Transfer     Bitrate
[  6]   0.00-1.01   sec  1.00 MBytes  8.35 Mbits/sec
[  6]   1.01-2.00   sec   768 KBytes  6.31 Mbits/sec
[  6]   2.00-3.00   sec  1.25 MBytes  10.5 Mbits/sec
[  6]   3.00-4.00   sec  1.12 MBytes  9.43 Mbits/sec
[  6]   4.00-5.01   sec  1.25 MBytes  10.5 Mbits/sec
[  6]   5.01-6.00   sec  1.00 MBytes  8.41 Mbits/sec
[  6]   6.00-7.00   sec  1.25 MBytes  10.5 Mbits/sec
[  6]   7.00-8.01   sec  1.12 MBytes  9.42 Mbits/sec
[  6]   8.01-9.00   sec  1.00 MBytes  8.43 Mbits/sec
[  6]   9.00-10.00  sec   896 KBytes  7.33 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  6]   0.00-10.00  sec  10.6 MBytes  8.91 Mbits/sec                  sender
[  6]   0.00-10.29  sec  10.7 MBytes  8.69 Mbits/sec                  receiver

iperf Done.

Testing the ethernet connection with a TP-LINK UE300 USB3.0 to Gigabit Ethernet adapter

Connecting to host 192.168.3.2, port 5201
[  6] local 192.168.3.8 port 61992 connected to 192.168.3.2 port 5201
[ ID] Interval           Transfer     Bitrate
[  6]   0.00-1.00   sec  37.0 MBytes   310 Mbits/sec
[  6]   1.00-2.00   sec  36.9 MBytes   308 Mbits/sec
[  6]   2.00-3.00   sec  36.5 MBytes   307 Mbits/sec
[  6]   3.00-4.01   sec  36.8 MBytes   308 Mbits/sec
[  6]   4.01-5.00   sec  36.8 MBytes   308 Mbits/sec
[  6]   5.00-6.00   sec  36.6 MBytes   308 Mbits/sec
[  6]   6.00-7.00   sec  36.8 MBytes   308 Mbits/sec
[  6]   7.00-8.00   sec  36.8 MBytes   309 Mbits/sec
[  6]   8.00-9.00   sec  36.9 MBytes   308 Mbits/sec
[  6]   9.00-10.00  sec  36.6 MBytes   309 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  6]   0.00-10.00  sec   368 MBytes   308 Mbits/sec                  sender
[  6]   0.00-10.01  sec   367 MBytes   308 Mbits/sec                  receiver

iperf Done.

Testing the ethernet connection with UGREEN USB-C 9-in-1 Multifunctional Adapter

Connecting to host 192.168.3.2, port 5201
[  6] local 192.168.3.12 port 64525 connected to 192.168.3.2 port 5201
[ ID] Interval           Transfer     Bitrate
[  6]   0.00-1.00   sec  68.5 MBytes   572 Mbits/sec
[  6]   1.00-2.01   sec  77.0 MBytes   646 Mbits/sec
[  6]   2.01-3.00   sec  77.4 MBytes   650 Mbits/sec
[  6]   3.00-4.01   sec  77.6 MBytes   651 Mbits/sec
[  6]   4.01-5.01   sec  77.6 MBytes   651 Mbits/sec
[  6]   5.01-6.00   sec  77.6 MBytes   651 Mbits/sec
[  6]   6.00-7.01   sec  79.8 MBytes   669 Mbits/sec
[  6]   7.01-8.01   sec  77.8 MBytes   652 Mbits/sec
[  6]   8.01-9.00   sec  75.1 MBytes   631 Mbits/sec
[  6]   9.00-10.00  sec  77.1 MBytes   649 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  6]   0.00-10.00  sec   766 MBytes   642 Mbits/sec                  sender
[  6]   0.00-10.00  sec   765 MBytes   642 Mbits/sec                  receiver

iperf Done.

Desktop PC (B660 GAMING X, i9-12900K) with Windows 11 Pro, testing the internal Realtek Gaming 2.5GbE LAN

Connecting to host 192.168.3.2, port 5201
[  4] local 192.168.3.13 port 54137 connected to 192.168.3.2 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec   113 MBytes   945 Mbits/sec
[  4]   1.00-2.00   sec   111 MBytes   933 Mbits/sec
[  4]   2.00-3.00   sec   111 MBytes   928 Mbits/sec
[  4]   3.00-4.00   sec   110 MBytes   924 Mbits/sec
[  4]   4.00-5.00   sec   111 MBytes   929 Mbits/sec
[  4]   5.00-6.00   sec   112 MBytes   936 Mbits/sec
[  4]   6.00-7.00   sec   112 MBytes   944 Mbits/sec
[  4]   7.00-8.00   sec   112 MBytes   941 Mbits/sec
[  4]   8.00-9.00   sec   112 MBytes   937 Mbits/sec
[  4]   9.00-10.00  sec   110 MBytes   928 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  1.09 GBytes   934 Mbits/sec                  sender
[  4]   0.00-10.00  sec  1.09 GBytes   934 Mbits/sec                  receiver

iperf Done.

This article is a work in progress. More tests and graphs will follow soon™️ 😊

For more info check the host tuning guides at the Energy Sciences Network website.

George Litos
George Litos
Senior Software Engineer