Why Speedtest is not enough
Most popular tests, such as Speedtest.net, only test bandwidth between your computer and the nearest node in the provider's infrastructure. This means that you are realistically testing only a portion of the link - the one that usually performs best.
In practice, we need data between specific points: for example, between your server room and a customer location, or between two data centers. Only this shows the true transmission capabilities, which are affected by firewalls, routers, VPNs, and various protocol overheads.
iPerf3 is a client-server mode tool available for Windows, Linux, macOS and even Android. With it, we can accurately examine the speed of data transfer between two hosts, measuring both TCP and UDP.
Installation on Debian systems is a matter of a single command:
sudo apt install iperf3
On one of the hosts, we run iPerf3 in server mode:
nginxiperf3 -s
By default, it listens on the port
5201
.On the second host, we run the client, pointing to the server IP:
cssiperf3 -c [adres IP serwera]
The results show the transmission speed in real time. In addition, we can use a graphics application such as. bmon, to visualize the data.
If you want to measure the sending speed in the other direction (from the client to the server), just use the switch -R
. iPerf3 uses TCP by default, but you can also force UDP with the -u
and determine the speed, duration of the test (-t
) or data size (-n
, -b
).
Examples of more advanced options:
--dscp
- to test traffic class--window
- to test traffic class--daemon
- background running--bind
- assignment to a specific IP address or port
iPerf3 is not only a tool for testing between two locations. It also works great for:
Diagnosing link problems in the server room,
testing the impact of VPNs,
verifying that 10Gbps links actually operate at the expected throughput.
Summary
If your job requires knowledge of actual network performance, not just marketing "up to 1 Gbps," then iPerf3 should be an essential tool in your arsenal.