Overview
When diagnosing throughput bottlenecks or validating maximum transmission capacity across Linux hosts, iperf3 stands out as the industry standard utility. This walkthrough details everything from package installation to server-client orchestration, exploring real-world techniques for benchmarking both TCP and UDP data paths.
Installing iperf3 and Inspecting Essential Flags
To begin benchmarking link performance in an Ubuntu environment, fetch and install the official iperf3 package from the repository.

Operating strictly on a client-server paradigm, iperf3 generates synthetic traffic patterns to profile network throughput. Running --version displays the installed binary release alongside compiled-in feature flags and protocol capabilities.
⚙️ [Core Command-Line Options]
-s : Spawns an iperf3 listening server waiting for inbound benchmark sessions.-c : Initiates client mode targeting the specified remote or local host address.-p : Customizes the destination listening port (defaults to port 5201).-i : Adjusts the periodic reporting frequency displayed in seconds.-t : Dictates the complete duration of the transmission run in seconds (default: 10s).-u : Switches the transport layer from default TCP streams to UDP datagrams.-b : Enforces a target bandwidth threshold or bitrate cap.-R : Triggers reverse mode, directing data flow from server to client to evaluate downlink speed.-P : Spawns concurrent parallel connections across multiple socket streams.-J : Serializes metrics directly into machine-readable JSON structure.

Spawning a Background Daemon and Testing Local TCP Loopback
Appending -D to iperf3 -s forks the listening process into a detached background daemon, freeing up your active shell session immediately.
This allows the server instance to quietly listen for incoming client probes without occupying an interactive terminal prompt.

Executing iperf3 -c 127.0.0.1 -t 5 dispatches an active test client to the loopback adapter (127.0.0.1), transmitting TCP streams over a 5-second interval.
The utility outputs dynamic per-second transfer volumes and bitrate metrics, summarizing the run with conclusive sender and receiver throughput averages upon completion.

Maximizing Pipe Capacity: Multi-Stream and Reverse Benchmarks
When dealing with high-latency or WAN links where a single connection cannot saturate available capacity, multi-stream testing becomes vital. Passing -P 4 in iperf3 -c 127.0.0.1 -P 4 -t 5 spins up four distinct, concurrent TCP streams, allowing administrators to inspect individual socket behaviors alongside the aggregated [SUM] throughput of the link.

By introducing the -R parameter in iperf3 -c 127.0.0.1 -R -t 5, the direction of payload flow is completely inverted for the 5-second session.
Because transmission originates from the server while the client ingests the payload, this mode offers a frictionless way to assess inbound download capabilities directly from client endpoints.

Profiling UDP Performance, Jitter, and Packet Drop Rates
Issuing iperf3 -c 127.0.0.1 -u -b 100M -t 5 enables unthrottled UDP evaluation by pairing -u with a configured target bit rate of 100 Mbps via -b 100M.
Since UDP operates without TCP congestion control windows or retransmissions, this assessment exposes critical real-time transport health metrics, notably jitter variance and dropped datagram percentages.

Once testing iterations conclude, terminate the detached server process running in the background by passing the process filter pattern to pkill -f 'iperf3 -s'.

Throughout this tutorial, we demonstrated practical workflows for profiling server network throughput and link saturation using iperf3 on Linux systems.
Integrating these versatile operational switches into your regular diagnostic routine will help you pinpoint transmission bottlenecks and validate infrastructure bandwidth with confidence.