iperf3 -s on one (it listens on TCP port 5201) and iperf3 -c 203.0.113.10 -P 4 on the other. Add -R to test the opposite direction. iperf3 measures throughput between those two hosts only, so pick a second host close to where your users are.
Before you start
- Throughput (bandwidth) is how much data per second gets through, shown in Mbits/sec or Gbits/sec. iperf3 measures it between a server (which listens) and a client (which connects).
- You need a second machine: another server, or your own computer. A test to a public iperf3 server only shows the path to that server.
- Open TCP port 5201 on the machine that runs
iperf3 -s, and close it again when you finish. See UFW, firewalld or Windows Firewall. - Commands use
sudofor a non-root user. As root, leave it out.
How to install iperf3
- Ubuntu / Debian
- AlmaLinux / Rocky
- Windows
How to run an iperf3 test
1
Open port 5201 on the server
- Ubuntu / Debian (UFW)
- AlmaLinux / Rocky (firewalld)
- Windows
2
Start the iperf3 server
On the server:It prints
Server listening on 5201 (test #1) and waits. Add -1 to exit after one test.3
Run the client
On the other machine, replace the IP with your server’s:
-P 4 runs four parallel streams and -t 30 runs for 30 seconds (default 10).4
Test the other direction
-R makes the server send and the client receive. Use --bidir to test both directions at once.5
Stop and close the port
Press Ctrl+C on the server, then remove the firewall rule (
sudo ufw delete allow 5201/tcp, or Remove-NetFirewallRule -DisplayName "iperf3 test" on Windows).How to read the result
The result is limited by the slowest part of the path: either machine’s network port, the route between them, or CPU on either side.
Useful iperf3 options
A UDP test also reports jitter and lost datagrams, which helps for voice and game traffic:
Frequently asked questions
Why is my iperf3 result lower than my port speed?
Distance, the slower of the two connections, CPU limits and TCP tuning all reduce throughput. Try more streams with-P 8, and on long paths see BBR.
Why does iperf3 say “unable to connect to server”?
If the message ends in “Connection refused”, nothing is listening: checkiperf3 -s is running. A timeout means a firewall drops the connection: check port 5201 is open on the server’s firewall.
Can iperf3 talk to iperf2?
No. iperf3 isn’t backwards compatible with iperf2, so use the same tool on both ends.Does iperf3 use more than one CPU core?
From version 3.16, iperf3 runs each stream in its own thread. Older versions use one core for all streams. Check withiperf3 --version.
Related guides
VPS and dedicated server guides
Every guide in this section.
Diagnose network latency
Find where lag and loss start.
Check bandwidth usage
See live and monthly traffic.
Enable BBR
Better TCP throughput on long paths.
Benchmark your VPS
CPU, disk and network tests.
Checked against the official iperf3 documentation and FAQ on 4 November 2026; Linux commands tested on Ubuntu 24.04 LTS (iperf 3.16). Commands can differ on other distributions or releases.
Need Extra Help?
If you encounter any issues, our support team is ready to assist:- Live Chat: Quick assistance via our website.
- Support Ticket: Open a Ticket
- Discord: Join our Community
- Email: support@freakhosting.com
Last Updated: November 2026