Skip to main content

Notes on iperf

(14 August 2012)

Available on rpmforge.

Basic throughput testing, TCP:

  • run the server
    # iperf -s
  • run the client


    # iperf -c 10.0.0.22
    ------------------------------------------------------------
    Client connecting to 10.0.0.22, TCP port 5001
    TCP window size: 16.0 KByte (default)
    ------------------------------------------------------------
    [  3] local 10.0.0.251 port 46617 connected with 10.0.0.22 port 5001
    [ ID] Interval       Transfer     Bandwidth
    [  3]  0.0-10.0 sec  1.10 GBytes    944 Mbits/sec
  • run the server in udp mode:
    # iperf -s -u
  • run the client in udp mode, rate-limited to 100 Mb/s:
    # iperf -c 10.0.0.22 -u -b 100m -i 1

Beware that when using UDP, the client will send at either its local maximum rate or the defined rate -- even if the server can't deal with that volume of data, and what the server can't deal with will be reported as lost packets. This is not necessarily a problem with your network. (UDP packets get lost. That's life.)