How to Perform Network Speed Test with iPerf3

iPerf3 helps you scientifically perform a network speed test. It is available to install on Windows, Linux, and macOS devices. This article explores how to use iPerf3 to evaluate network throughput and explains settings to keep in mind when using iPerf.

Step 1: Install iPerf3

Option #1) Install iPerf3 on Windows via Scoop Package Manager

To begin with, you can install iPerf3 on Windows via a package manager such as Scoop.

Let’s check if the iPerf3 binary is available via Scoop:

scoop info iperf3

Check the availability of iPerf3 binary via Scoop package manager
scoop info iperf3
scoop info iperf3

Next, install iPerf3 via Scoop. Note that a package manager like Scoop will automatically install dependencies and update other software packages. So it may take some time to install iPerf3. Feel free to enjoy a cup of coffee in the meantime.

scoop install iperf3

Use Scoop package manager to install iperf3 on Windows.
scoop install iperf3
scoop install iperf3

Check that iPerf3 is installed on Windows and that it can be launched.

iperf3 –version

Check the version of iPerf3 on Windows
Check iperf3 installed on Windows
Check iperf3 installed on Windows

Option #2) Install iPerf3 on macOS via Brew Package Manager

Apart from installing iPerf3 on Windows, you can also install it on other operating systems, such as macOS. Similarly, we use a package manager to install iPerf3 to simplify the installation process.

Just as installing iPerf3 on Windows using Scoop, you can check the availability of the software using Brew.

brew info iperf3

Check the availability of iPerf3 binary via Brew package manager
brew info iperf3
brew info iperf3

Next, install iPerf3 via Brew.

brew install iperf3

Use Brew package manager to install iperf3 on macOS.
brew install iperf3
brew install iperf3

Check that iPerf3 is installed on macOS and that it can be launched.

iperf3 –version

Check the version of iPerf3 on macOS
Check iperf3 installed on macOS
Check iperf3 installed on macOS

Step 2: Run iPerf3 on a Device as a Server

To determine the network throughput between two endpoints, there must be a server and a client. In this article, we will use a Windows device as a server and a Mac as a client.

We can start by instructing iPerf3 to act as a server. By default, iPerf3 will use port 5201. Make sure the port is reachable by the client and that the Windows firewall permits the inbound connection of the port/range used by iPerf.

iperf3 -s

The command to allow iperf3 act as a server.
iperf3 server mode
iperf3 server mode

Check the IP address or hostname of your server so that you can connect to the server from a client device.

Check IP Address
Check IP Address

Step 3: Run iPerf3 on a Device as a Client

Option #1) Run iPerf in single-stream mode

By default, the iPerf client will launch a single-stream mode when establishing a connection to the server. iPerf3 will evaluate the network performance in 10 seconds and display the result on both the client and server sides. The iPerf3 client will upload data to the server and measure the network performance.

iperf3 -c [IP Address]

Connect to the iPerf server from a client device using a single stream.
iperf3 client single stream
iperf3 client single stream – the result shows 593 Mbits/sec

Option #2) Run iPerf in parallel streams mode

You may notice that the network throughput is not as high as your expectation under a single-stream mode. Running iPerf in a single-stream mode may not necessarily reflect the highest throughput in your network environment due to limitations such as CPU contention for a single thread. Accordingly, you can specify that the iPerf client uses multiple streams to connect to the server.

iperf3 -c [IP Address] -P [num]

Connect to the iPerf server from a client device using multiple stream by specifying a “parallel” parameter: “-P”
iperf3 client multiple streams
iperf3 client multiple streams
iperf3 client multiple streams result
iperf3 client multiple streams – the result shows 789 Mbits/sec

A Speed Comparison between a Speed Test Website and iPerf

iPerf helps you determine the network throughput between two endpoints of your choice. You must own both the server and the client in order to run iPerf. Whereas a speed test website allows you to perform broadband speed tests without the need to own a server. Both methods allow us to perform speed tests but are used in different scenarios.

Let’s observe the speed difference between running a speed test on fast.com and using iPerf.

Option #1) Running Speed Test through the Internet

A speed test can be easily performed by visiting websites such as fast.com.

Speed Test Website
Running a simple speed test on a website

Option #2) Running Speed Test in a Local Area Network (LAN)

In comparison, the speed test performed in a LAN environment displayed a worse result, even when the endpoints were connected to the same router and switch. One of the possible causes is that the hardware in an endpoint is insufficient to satisfy the Gigabit ethernet throughput. For instance, a CPU contention in the server may reduce the performance measured via iPerf3.

iperf3 client multiple streams result
iperf3 client multiple streams – the result shows 789 Mbits/sec

Keep in mind that the iPerf3 client, by default, evaluates network throughput by uploading data to the server. A download test is often prioritized over an upload test for speed test websites. Accordingly, you may specify the iPerf3 client to download from the server, so the performance test is more akin to the one performed over the Internet.

iperf3 -c [IP Address] -P [num] -R

Specifying the “-R” parameter allows the iPerf3 client to run in reverse mode, meaning the server sends and the client receives
iperf3 client reverse mode
iperf3 client reverse mode

By specifying the client to download rather than upload, the result may be different.

Conclusion

iPerf3 makes it easy for administrators to determine the network throughput between two devices accurately. Rather than finding a large file to transfer between two devices, iPerf3 can handle the speed test task effortlessly. If users experience network slowdown, system administrators may run iPerf3 to evaluate the network performance and identify if there is any bottleneck between the two endpoints.