
iPerf3 Guide: Test TCP/UDP Throughput, Jitter & Packet Loss
Introduction
When a network connection feels slow, a standard internet speed test does not always reveal where the problem is.
The connection between two servers may be slower than expected. A VPN tunnel might deliver inconsistent throughput. A Wi-Fi network may have enough bandwidth for downloads but still experience packet loss or unstable latency-sensitive traffic.
iPerf3 is a command-line network performance tool that helps measure throughput between two endpoints. It supports TCP, UDP, and SCTP testing, allowing administrators to evaluate network capacity and investigate performance problems across local networks, WAN links, VPNs, and data center infrastructure.
Unlike a typical internet speed test, iPerf3 lets you choose both endpoints. You can run a controlled test between two Linux servers, a workstation and a network appliance, or two systems connected through a specific network path.
This guide explains how iPerf3 works, how to configure its server and client, how to run TCP and UDP tests, how to understand the results, and how to troubleshoot low throughput and packet loss.
1. What Is iPerf3?
iPerf3 is an open-source network performance measurement tool developed by the Energy Sciences Network (ESnet).
It uses a client-server architecture:
- The server listens for incoming test connections.
- The client connects to the server and initiates a test.
- Both endpoints exchange measurement data and report throughput statistics.
iPerf3 can measure:
- TCP throughput.
- UDP throughput.
- SCTP throughput on supported platforms.
- TCP retransmissions.
- UDP jitter and datagram loss.
- Performance in the forward and reverse directions.
- Performance across multiple parallel streams.
The official project documentation is available at iPerf3 Documentation.
What iPerf3 measures
iPerf3 primarily measures network throughput between the two test endpoints.
For example, if two servers are connected through a 1 Gbps network, iPerf3 can help determine how much TCP or UDP traffic they can exchange under the test conditions.
However, the result is not necessarily the maximum physical capacity of the network link.
The measured throughput can also depend on:
- CPU performance on both endpoints.
- Network interface capabilities.
- TCP congestion control.
- Socket buffers.
- Packet loss and retransmissions.
- Firewall and routing configuration.
- Virtualization and container overhead.
- The network path between the systems.
iPerf3 is therefore a network measurement tool, not a replacement for packet analysis or application-level performance monitoring.
2. iPerf2 vs iPerf3: What Is the Difference?
Although their names are similar, iPerf2 and iPerf3 are separate implementations.
They are not fully backward-compatible, so both endpoints should use compatible versions of the same tool.
| Feature | iPerf2 | iPerf3 |
|---|---|---|
| TCP testing | Yes | Yes |
| UDP testing | Yes | Yes |
| Client-server model | Yes | Yes |
| JSON output | Different options | Supported with -J |
| Parallel streams | Yes | Yes |
| Modern multi-threaded implementation | Yes | Supported from version 3.16 |
| Official Windows support | Yes | No |
| SCTP testing | Limited by platform/build | Supported on Linux and FreeBSD |
One important difference is the iPerf3 threading model.
Versions before 3.16 were single-threaded. Beginning with version 3.16, iPerf3 uses a separate thread for each test stream, allowing parallel tests to use multiple CPU cores.
This matters when measuring high-speed links, where the test application itself can become the bottleneck.
For detailed compatibility information, see the official iPerf3 FAQ.
Windows compatibility note: iPerf3 is not officially supported on Windows. Community-provided Windows builds exist, but compatibility can vary. ESnet recommends iPerf2 for Windows environments.
3. Installing iPerf3 on Linux and macOS
You need iPerf3 installed on both the client and server.
Ubuntu and Debian
Update the package index:
sudo apt updateInstall iPerf3:
sudo apt install iperf3Check the installed version:
iperf3 --versionFedora and RHEL-based distributions
Where the package is available in your configured repositories:
sudo dnf install iperf3Check the installation:
iperf3 --versionmacOS
Using Homebrew:
brew install iperf3Then:
iperf3 --versionFreeBSD
Install the package:
sudo pkg install iperf3Verify:
iperf3 --versionFor other platforms, consult the official iPerf3 project repository.
4. Understanding the iPerf3 Client and Server
An iPerf3 test requires two endpoints.
Consider this example:
+------------------+ +------------------+
| Client | | Server |
| | | |
| 192.0.2.20 |------------>| 192.0.2.10 |
| | | |
| iperf3 -c | | iperf3 -s |
+------------------+ +------------------+The example addresses belong to a documentation-only IP range. Replace them with addresses that are actually reachable in your environment.
Step 1: Start the iPerf3 server
On the remote system, execute:
iperf3 -sThe server starts listening for incoming connections.
By default, iPerf3 uses TCP port 5201 for its control connection.
To use a different port:
iperf3 -s -p 5002Keep the server running while performing the test.
Step 2: Run the client
On the client system:
iperf3 -c 192.0.2.10The client connects to the server and starts a TCP throughput test.
To run a longer test with one-second reporting intervals:
iperf3 -c 192.0.2.10 -t 30 -i 1This runs the test for 30 seconds and displays periodic results every second.
A longer test can help reveal sustained performance problems that may not appear during a brief measurement.
5. How to Perform an iPerf3 TCP Test
TCP is the best starting point for most network throughput investigations.
It measures the amount of data that can be transferred while TCP handles acknowledgments, congestion control, retransmissions, and flow control.
Start with a standard test:
iperf3 -c 192.0.2.10 -t 30 -i 1For multiple simultaneous TCP streams:
iperf3 -c 192.0.2.10 -P 4 -t 30 -i 1The -P 4 option creates four parallel test streams.
Compare the single-stream and multi-stream results.
If four streams achieve substantially higher throughput than one stream, investigate whether a single TCP flow is limited by CPU processing, TCP window behavior, congestion control, or another host-side constraint.
Do not automatically assume that the higher multi-stream result represents normal application performance. Real applications may use different numbers of connections.
Test the reverse direction
A standard iPerf3 test sends data from the client to the server.
To measure the opposite direction, use:
iperf3 -c 192.0.2.10 -R -t 30This makes the server send data to the client.
Reverse testing is particularly useful when investigating:
- Asymmetric routing.
- Different upload and download performance.
- Direction-dependent firewall behavior.
- NIC offload problems.
- WAN and VPN throughput differences.
To test both directions simultaneously on a compatible iPerf3 version:
iperf3 -c 192.0.2.10 --bidir -t 30This is useful when both endpoints transmit and receive at the same time, although the result represents a different workload from two separate one-way tests.
6. How to Perform an iPerf3 UDP Test
TCP automatically adjusts transmission based on congestion and network conditions.
UDP behaves differently. It does not provide TCP-style congestion control or retransmission.
An iPerf3 UDP test allows you to specify a target transmission rate and measure how the network handles that offered traffic.
Run a UDP test at 50 Mbps:
iperf3 -c 192.0.2.10 -u -b 50M -t 30 -i 1Important options:
| Option | Meaning |
|---|---|
-u | Use UDP instead of TCP |
-b 50M | Set the target bitrate to 50 Mbps |
-t 30 | Run for 30 seconds |
-i 1 | Display results every second |
Important: Specify -b when performing UDP tests. The default UDP target bitrate is 1 Mbit/s, which may be too low for the network capacity you intend to investigate.
Start with a conservative rate, then increase it gradually.
For example:
iperf3 -c 192.0.2.10 -u -b 10M -t 30
iperf3 -c 192.0.2.10 -u -b 50M -t 30
iperf3 -c 192.0.2.10 -u -b 100M -t 30Compare the received bitrate, jitter, and lost datagrams at each rate.
Do not assume that a UDP test showing high packet loss automatically indicates a faulty switch or cable. The sender may simply be transmitting faster than the path or receiving host can handle.
7. Understanding iPerf3 Results
Correctly interpreting the output is just as important as running the test.
A simplified TCP output might look like this:
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.00 sec 1.09 GBytes 936 Mbits/sec
[ 5] sender
[ 5] 0.00-10.00 sec 1.08 GBytes 928 Mbits/sec
[ 5] receiverThe important fields are:
Interval: The time period used for the measurement.
Transfer: The amount of data transferred during that interval.
Bitrate: The measured data rate.
Sender: Statistics from the sending endpoint.
Receiver: Statistics from the receiving endpoint.
For TCP, inspect the final sender and receiver summaries, and check retransmission statistics when available.
A difference between sender and receiver results can be useful when investigating congestion, loss, or endpoint limitations.
Understanding UDP output
UDP output includes additional information:
[ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams
[ 5] 0.00-10.00 sec 119 MBytes 99.8 Mbits/sec 0.185 ms 12/86540 (0.014%) receiverThe main fields are:
Jitter: Variation in the arrival timing of UDP datagrams, as reported by the test.
Lost/Total Datagrams: Number of datagrams reported as missing compared with the total expected.
Bitrate: The measured data rate.
The receiver-side result is particularly important because it shows what arrived at the destination.
Jitter should be interpreted according to the application being tested. There is no single universal threshold that determines whether a network is suitable for every voice, video, or real-time workload.
8. Useful iPerf3 Commands for Network Engineers
The following examples are useful during routine troubleshooting.
Test throughput for 60 seconds
iperf3 -c 192.0.2.10 -t 60 -i 1Test in reverse mode
iperf3 -c 192.0.2.10 -RUse four parallel streams
iperf3 -c 192.0.2.10 -P 4Run a UDP test
iperf3 -c 192.0.2.10 -u -b 100M -t 30Use JSON output
iperf3 -c 192.0.2.10 -JJSON output is useful when integrating network measurements with scripts, dashboards, and monitoring systems.
Change the reporting interval
iperf3 -c 192.0.2.10 -i 5 -t 60Bind the client to a specific local interface address
iperf3 -c 192.0.2.10 -B 192.0.2.20This is useful on multihomed systems where traffic must leave through a particular source address.
Skip the initial TCP slow-start measurement period
iperf3 -c 192.0.2.10 -O 3 -t 30The -O 3 option omits the first three seconds from reported test statistics. It does not mean that the test itself begins after three seconds of network inactivity.
For the complete list of options, consult the iPerf3 manual.
9. Troubleshooting Common iPerf3 Problems
A successful connection does not necessarily mean that the measured performance is healthy.
The following workflow helps narrow down common problems.
Problem 1: Unable to Connect to the iPerf3 Server
Example error:
iperf3: error - unable to connect to serverPossible causes include:
- iPerf3 server is not running.
- Incorrect server IP address.
- TCP port 5201 is blocked.
- Firewall or NAT rules prevent the connection.
- The server is listening on a different port.
- Routing between the endpoints is incorrect.
On the server, check whether iPerf3 is listening:
ss -lntp | grep 5201Check basic reachability:
ping 192.0.2.10Test the TCP connection:
nc -vz 192.0.2.10 5201For more connection-testing techniques, see our Netcat Explained guide.
Remember that UDP tests also require the UDP data path to be permitted by the relevant firewalls. Allow only the required traffic between trusted test endpoints.
Problem 2: iPerf3 Shows Low TCP Throughput
If a network link is expected to deliver high throughput but iPerf3 reports a much lower result, investigate both endpoints before changing network configurations.
Check CPU utilization:
topInspect interface statistics:
ip -s linkCheck the interface speed and negotiated link mode:
sudo ethtool eth0Look for:
- High CPU utilization.
- Interface errors.
- Dropped packets.
- Incorrect link speed or duplex.
- TCP retransmissions.
- Poor TCP window behavior.
- Congestion along the network path.
Next, compare one stream with multiple streams:
iperf3 -c 192.0.2.10 -P 1 -t 30
iperf3 -c 192.0.2.10 -P 4 -t 30If performance changes significantly, investigate host processing, TCP behavior, and the network path.
Problem 3: UDP Packet Loss Is High
An example result might show:
Lost/Total Datagrams: 1250/50000 (2.5%)Possible causes include:
- UDP transmission rate is too high.
- Congestion or queue drops.
- Firewall or router packet drops.
- CPU limitations.
- NIC receive-ring pressure.
- Socket-buffer limitations.
Reduce the target rate and repeat the test.
For example:
iperf3 -c 192.0.2.10 -u -b 20M -t 30Then increase the rate gradually.
If unexpected UDP loss remains, confirm that both systems are running a recent version of iPerf3. The official FAQ also recommends investigating socket-buffer settings on affected systems, including testing a larger buffer with:
iperf3 -c 192.0.2.10 -u -b 50M -w 2M -t 30Change one variable at a time so that the result remains useful for diagnosis.
See the official iPerf3 FAQ for additional UDP troubleshooting details.
Problem 4: TCP Throughput Drops to Almost Zero
A TCP test may begin normally and then show a severe throughput reduction.
One possible cause is a TCP segmentation offload problem involving the network adapter.
On some systems, TSO or Windows Large Send Offload (LSO) can interact incorrectly with path MTU behavior.
Useful diagnostic tests include:
- Run the reverse test.
- Repeat with a smaller TCP buffer length.
- Inspect TCP behavior with Wireshark.
- Review interface and driver statistics.
- Compare the result with offload settings.
For example:
iperf3 -c 192.0.2.10 -l 512 -t 30The -l option changes the test buffer length. It is a diagnostic technique, not a universal performance fix.
The iPerf3 FAQ describes this class of problem and the relationship between TCP segmentation offload, packet sizing, and reverse testing.
Problem 5: Different Results in Each Direction
For example:
Client to Server: 900 Mbps
Server to Client: 250 MbpsThis may indicate asymmetric performance.
Possible causes include:
- Different routing paths.
- Interface errors on one side.
- Direction-specific congestion.
- Firewall inspection overhead.
- Traffic shaping or QoS policies.
- NIC offload differences.
- CPU limitations on one endpoint.
Run both directions separately:
iperf3 -c 192.0.2.10 -t 30
iperf3 -c 192.0.2.10 -R -t 30If the problem occurs only in one direction, investigate the sender and receiver roles in that test rather than changing unrelated network settings.
10. Using iPerf3 with Wireshark
iPerf3 gives you useful throughput statistics, but it does not show every packet-level detail.
When a test produces unexpected results, Wireshark can help identify what is happening on the wire.
For example, you can investigate:
- TCP retransmissions.
- Duplicate acknowledgments.
- TCP window behavior.
- Packet-size inconsistencies.
- ICMP fragmentation-needed messages.
- Unexpected connection resets.
- UDP packet arrival patterns.
A practical workflow is:
- Start a packet capture on the client or server.
- Run a controlled iPerf3 test.
- Stop the capture after the test finishes.
- Inspect the TCP or UDP conversation.
- Compare packet-level observations with iPerf3 statistics.
For a detailed introduction to packet capture and filtering, read our Wireshark Explained guide.
You can also use our Linux Network Tools guide for additional commands such as ip, ss, ping, dig, and tcpdump.
11. Best Practices for Reliable iPerf3 Testing
A well-designed test should minimize variables that could distort the measurement.
Follow these practices:
Use consistent endpoints. Run tests between the same two systems when comparing results over time.
Start with one stream. Establish a baseline before introducing parallel streams.
Test both directions. Upload and download performance may differ.
Use appropriate UDP rates. Gradually increase the offered bitrate instead of immediately sending traffic at the theoretical maximum link speed.
Monitor CPU utilization. A high-speed network test can become limited by the test endpoints.
Use recent versions. Version differences can affect functionality and performance.
Repeat tests. Run multiple tests to distinguish persistent problems from temporary congestion.
Use JSON output for automation. The -J option makes it easier to collect and process results programmatically.
Avoid exposing an unrestricted test server. Restrict access to trusted clients and use firewall rules to limit who can connect.
Separate network testing from application testing. A high iPerf3 result does not guarantee that file transfers, web applications, or database operations will achieve the same throughput.
12. Frequently Asked Questions
What is iPerf3 used for?
iPerf3 measures network throughput between two endpoints. It is commonly used to test TCP and UDP performance, measure packet loss and jitter, and troubleshoot network bottlenecks.
How do I run an iPerf3 test?
Start the server:
iperf3 -sThen run the client:
iperf3 -c SERVER_IPReplace SERVER_IP with the reachable address of the server.
What is the default iPerf3 port?
The default server port is TCP 5201 for the initial control connection. Depending on the test protocol, the data traffic uses the corresponding TCP or UDP transport.
What is the difference between an iPerf3 TCP test and a UDP test?
TCP testing measures throughput with TCP reliability and congestion-control mechanisms. UDP testing sends datagrams at a configurable rate and reports metrics such as jitter and datagram loss.
What does the iPerf3 -R option do?
The -R option reverses the test direction. The server sends traffic to the client instead of the client sending traffic to the server.
What does the iPerf3 -P option do?
The -P option sets the number of parallel client streams. Multiple streams can help test whether a single TCP flow or endpoint processing is limiting throughput.
Why does iPerf3 show packet loss?
UDP packet loss may occur because of congestion, excessive sending rates, host CPU limitations, receive-buffer pressure, or packet drops in network equipment.
Can iPerf3 test Wi-Fi performance?
Yes. You can run iPerf3 between a Wi-Fi-connected client and a wired server to measure throughput across the wireless network path. The result can help reveal wireless performance limitations.
Is iPerf3 officially supported on Windows?
No. The official project does not list Windows as a supported platform. Community builds exist, but ESnet recommends iPerf2 for Windows users.
Does iPerf3 measure internet speed?
It can measure throughput between two endpoints across the internet, but the result depends on the selected server, routing, host performance, and the path between the systems. It is not identical to a typical consumer internet speed test.
Conclusion
iPerf3 is an important tool for network engineers, system administrators, and infrastructure teams who need to measure throughput and investigate network performance.
Its client-server model makes it possible to test a specific path rather than relying on generic internet speed measurements.
By combining TCP tests, UDP measurements, reverse-mode testing, parallel streams, and packet analysis with Wireshark, administrators can identify performance limitations more accurately.
The most reliable approach is to begin with simple tests, measure both directions, increase test complexity gradually, and investigate the endpoints as carefully as the network itself.
References
- Official iPerf3 Documentation
- iPerf3 Command-Line Manual
- iPerf3 Frequently Asked Questions
- ESnet Network Performance Testing Guide
- ESnet Throughput Tool Comparison
FAQ Schema (JSON-LD)
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "What is iPerf3 used for?",
"acceptedAnswer": {
"@type": "Answer",
"text": "iPerf3 measures network throughput between two endpoints. It is commonly used to test TCP and UDP performance, measure packet loss and jitter, and troubleshoot network bottlenecks."
}
},
{
"@type": "Question",
"name": "How do I run an iPerf3 test?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Start the server with iperf3 -s, then run the client with iperf3 -c SERVER_IP using the reachable address of the server."
}
},
{
"@type": "Question",
"name": "What is the default iPerf3 port?",
"acceptedAnswer": {
"@type": "Answer",
"text": "The default server port is TCP 5201 for the initial control connection. Test data uses the corresponding TCP or UDP transport."
}
},
{
"@type": "Question",
"name": "What is the difference between an iPerf3 TCP test and a UDP test?",
"acceptedAnswer": {
"@type": "Answer",
"text": "TCP testing measures throughput with TCP reliability and congestion-control mechanisms. UDP testing sends datagrams at a configurable rate and reports metrics such as jitter and datagram loss."
}
},
{
"@type": "Question",
"name": "What does the iPerf3 -R option do?",
"acceptedAnswer": {
"@type": "Answer",
"text": "The -R option reverses the test direction so that the server sends traffic to the client."
}
},
{
"@type": "Question",
"name": "Can iPerf3 test Wi-Fi performance?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Yes. Running iPerf3 between a Wi-Fi-connected client and a wired server measures throughput across the wireless network path."
}
},
{
"@type": "Question",
"name": "Is iPerf3 officially supported on Windows?",
"acceptedAnswer": {
"@type": "Answer",
"text": "No. The official project does not list Windows as a supported platform. Community builds exist, but ESnet recommends iPerf2 for Windows users."
}
}
]
}