Skip to content

Optimize Network Performance with iperf3 Command

Maximize your network's potential with the iperf3 command. Learn how to measure network bandwidth, throughput, and latency with ease.

Explore a range of options to customize tests, including UDP support, specifying test duration and parallel threads, using custom ports, and reporting results in preferred formats. Enhance your networking troubleshooting skills and optimize performance with this comprehensive iperf3 cheatsheet.


Listening Server

iperf3 -s

Speedtest the listening server

iperf3 -c listening.server.ip

Run iperf3 in a daemon

iperf3 --daemon

Use udp rather then tcp

iperf3 --udp

Time in seconds to transmit

iperf3 --time 10

Number of bytes to transmit (instead of -t)

iperf3 --bytes 10K/M/G

Run test in 10 parallel threads

iperf3 -P 10 -c listening.server.ip

Run iperf3 on a custom port

iperf3 --port 9090

Report speed in prefered format

Kbits, Mbits, Gbits and TBits is available, use uppercase character for specify format

iper3 --format kmgtK/M/G/T

Set seconds between periodic throughput reports

iperf3 --interval 10

Write a pidfile when using iperf3

iperf --pidfile /var/run/iperf3.pid

xmit or recvieve the specified file

iperf3 --file foo.bin

Set CPU affinity

iperf3 --affinity n/n,m 

Bind nic interface to use

iperf3 --bind [host.on.ip__OR__interfaceNic]
iperf3 --json

Run iperf3 in verbose mode

iperf3 -V

Force flush output at every interval

Format must be set with srftime(3)

iperf3  --forceflush=format

Run with debug mode enable

  • 1 = lowest
  • 4 = max
iperf3 --debug=[1-4]
iperf3 --version

RSA private key used to decrypt authentication credentials

iperf3 --rsa-private-key-path    

Path to the configuration file containing user credentials

iperf3  --authorized-users-path   

Time skew threshold (in seconds) between the server

iperf3  --time-skew-threshold     

Set the IPv6 flow label (only supported on Linux)

iperf3 --flowlabel N         

Use a 'zero copy' method of sending data

iperf3 --zerocopy