1IPERF(1)                         User Manuals                         IPERF(1)
2
3
4

NAME

6       iperf  -  perform  network traffic tests using network sockets. Metrics
7       include throughput and latency.
8

SYNOPSIS

10       iperf -s [options]
11
12       iperf -c server [options]
13
14       iperf -u -s [options]
15
16       iperf -u -c server [options]
17
18

DESCRIPTION

20       iperf 2 is a testing tool which performs network  traffic  measurements
21       using  network  sockets.  The  performance  metrics  supported  include
22       throughput and latency. Iperf can use both TCP and UDP sockets (or pro‐
23       tocols.)  It  supports  unidirectional,  full  duplex (same socket) and
24       bidirectional traffic,  and  supports  multiple,  simultaneous  traffic
25       streams. It supports multicast traffic including source specific multi‐
26       cast (SSM) joins. Its multi-threaded design  allows  for  peak  perfor‐
27       mance. Metrics displayed help to characterize host to host network per‐
28       formance. Note: Setting the enhanced (-e) option provides all available
29       metrics.
30
31       The user must establish both a both a server (to receive traffic) and a
32       client (to generate and send traffic) for a test to occur.  The  client
33       and  server  typically are on different hosts or computers but need not
34       be.
35

GENERAL OPTIONS

37       -b, --bandwidth
38              set the target bandwidth and  optional  standard  deviation  per
39              <mean>,[<stdev>] (See NOTES for suffixes)
40
41       -e, --enhanced
42              Display  enhanced  output in reports otherwise use legacy report
43              (ver 2.0.5) formatting (see NOTES)
44
45       -f, --format [abkmgBKMG]
46              format to report: adaptive, bits, Bytes,  Kbits,  Mbits,  Gbits,
47              KBytes, MBytes, GBytes (see NOTES for more)
48
49       -h, --help
50              print a help synopsis
51
52           --hide-ips
53              obscure  ip  addresses in output (useful when wanting to publish
54              results and not display the full ip addresses. v4 only)
55
56       -i, --interval < t | f >
57              sample or display interval reports every t seconds (default)  or
58              every  frame  or burst, i.e. if f is used then the interval will
59              be each frame or burst. The frame interval reporting is  experi‐
60              mental.   Also suggest a compile with fast-sampling, i.e. ./con‐
61              figure --enable-fastsampling
62
63       -l, --len n[kmKM]
64              set read/write buffer size (TCP) or length (UDP) to n  (TCP  de‐
65              fault 128K, UDP default 1470)
66
67           --l2checks
68              perform  layer 2 length checks on received UDP packets (requires
69              systems that support packet sockets, e.g. Linux)
70
71       -m, --print_mss
72              print TCP maximum segment size
73
74           --NUM_REPORT_STRUCTS <count>
75              Override the default shared  memory  size  between  the  traffic
76              thread(s)  and  reporter  thread in order to mitigate mutex lock
77              contentions. The default value of 5000 should be sufficient  for
78              1Gb/s networks. Increase this upon seeing the Warning message of
79              reporter thread too slow. If the  Warning  message  isn't  seen,
80              then  increasing  this  won't have any significant effect (other
81              than to use some additional memory.)
82
83       -o, --output filename
84              output the report or error message to this specified file
85
86           --permit-key [=<value>]
87              Set a key value that must match for the server to accept traffic
88              on  a  connection. If the option is given without a value on the
89              server a key value will be autogenerated and  displayed  in  its
90              initial  settings  report.  The lifetime of the key is set using
91              --permit-key-timeout and defaults to twenty seconds.  The  value
92              is  required  on clients. The value will also be used as part of
93              the transfer id in reports. The option set on the client but not
94              the  server  will  also  cause the server to reject the client's
95              traffic. TCP only, no UDP support.
96
97       -p, --port m[-n]
98              set client or server port(s) to send or listen on per m (default
99              5001)  w/optional  port  range  per m-n (e.g. -p 6002-6008) (see
100              NOTES)
101
102           --sum-dstip
103              sum traffic threads based upon the destination IP  address  (de‐
104              fault is source ip address)
105
106           --sum-only
107              set  the output to sum reports only. Useful for -P at large val‐
108              ues
109
110       -t, --time n
111              time in seconds to listen for new traffic  connections,  receive
112              traffic or send traffic
113
114       -u, --udp
115              use UDP rather than TCP
116
117       -w, --window n[kmKM]
118              TCP window size (socket buffer size)
119
120       -z, --realtime
121              Request real-time scheduler, if supported.
122
123       -B, --bind host[:port][%dev]
124              bind  to host, ip address or multicast address, optional port or
125              device (see NOTES)
126
127       -C, --compatibility
128              for use with older versions does not sent extra msgs
129
130       -M, --mss n
131              set TCP maximum segment size using TCP_MAXSEG
132
133       -N, --nodelay
134              set TCP no delay, disabling Nagle's Algorithm
135
136       -v, --version
137              print version information and quit
138
139       -x, --reportexclude [CDMSV]
140              exclude C(connection) D(data) M(multicast) S(settings) V(server)
141              reports
142
143       -y, --reportstyle C|c
144              if set to C or c report results as CSV (comma separated values)
145
146       -Z, --tcp-congestion
147              Set  the default congestion-control algorithm to be used for new
148              connections. Platforms must support setsockopt's TCP_CONGESTION.
149              (Notes: See sysctl and tcp_allowed_congestion_control for avail‐
150              able options. May require root privileges.)
151

SERVER SPECIFIC OPTIONS

153       -1, --singleclient
154              set the server to process only one client at a time
155
156       -b, --bandwidth n[kmgKMG]
157              set target read rate to n bits/sec. TCP only for the server.
158
159       -s, --server
160              run in server mode
161
162           --histograms[=binwidth[u],bincount,[lowerci],[upperci]]
163              enable latency histograms for udp packets (-u), for  tcp  writes
164              (with --trip-times), or for either udp or tcp with --isochronous
165              clients. The binning can be modified. Bin widths (default 1 mil‐
166              lisecond,  append  u  for microseconds, m for milliseconds) bin‐
167              count is total bins (default 1000), ci  is  confidence  interval
168              between 0-100% (default lower 5%, upper 95%, 3 stdev 99.7%)
169
170           --permit-key [=<value>]
171              Set a key value that must match for the server to accept traffic
172              from a client (also set with --permit-key.) The server will  au‐
173              togenerate  a globally unique key when the option is given with‐
174              out a value. This value will be displayed in the  server's  ini‐
175              tial  settings  report.  The  lifetime  of  the key is set using
176              --permit-key-timeout and defaults to twenty seconds.  TCP  only,
177              no UDP support.
178
179           --permit-key-timeout <value>
180              Set  the  lifetime  of the permit key in seconds. Defaults to 20
181              seconds if not set. A value of zero will disable the timer.
182
183           --tap-dev <dev>
184              Set the receive interface to the TAP device as specified.
185
186           --tcp-rx-window-clamp n[kmKM]
187              Set the socket option of TCP_WINDOW_CLAMP, units is bytes.
188
189       -t, --time n
190              time in seconds to listen for new traffic connections and/or re‐
191              ceive traffic (defaults to infinite)
192
193           --tos-override n
194              set  the socket's IP_TOS (byte) field for reverse or full duplex
195              traffic. Supported in versions 2.1.5 or greater.  Previous  ver‐
196              sions won't set IP_TOS on reverse traffic.
197
198       -B, --bind ip | ip%device
199              bind src ip addr and optional src device for receiving
200
201       -D, --daemon
202              run  the server as a daemon. On Windows this will run the speci‐
203              fied command-line under the IPerfService, installing the service
204              if  necessary.  Note the service is not configured to auto-start
205              or restart - if you need a self-starting service you  will  need
206              to create an init script or use Windows "sc" commands.
207
208       -H, --ssm-host host
209              Set  the  source host (ip addr) per SSM multicast, i.e. the S of
210              the S,G
211
212       -R, --remove
213              remove the IPerfService (Windows only).
214
215       -U, --single_udp
216              run in single threaded UDP mode
217
218       -V, --ipv6_domain
219              Enable IPv6 reception  by  setting  the  domain  and  socket  to
220              AF_INET6 (Can receive on both IPv4 and IPv6)
221

CLIENT SPECIFIC OPTIONS

223       -b, --bandwidth n[kmgKMG][,n[kmgKMG]] | n[kmgKMG]pps
224              set  target  bandwidth  to  n bits/sec (default 1 Mbit/sec) or n
225              packets per sec. This may be used with TCP or  UDP.  Optionally,
226              for variable loads, use format of  mean,standard deviation
227
228           --bounceback
229              run  a  tcp bounceback test (set size with -l or --len, defaults
230              to 100 bytes)
231
232           --bounceback-congest
233              request a concurrent full-duplex TCP stream
234
235           --bounceback-hold n
236              request the server to insert a delay of n  milliseconds  between
237              its read and write (default is no delay)
238
239           --bounceback-period n
240              request the client schedule a send every n milliseconds (w/o op‐
241              tion bouncebacks are immediately scheduled. With command  option
242              and no optional value given, the interval will be one second.)
243
244           --bounceback-no-quickack
245              request  the server not set the TCP_QUICKACK socket option (dis‐
246              abling TCP ACK delays) during a bounceback test (see NOTES)
247
248           --burst-period n
249              Set the burst period in seconds. Defaults to one second.  (Note:
250              assumed use case is low duty cycle traffic bursts)
251
252           --burst-size n
253              Set  the  burst  size  in  bytes.  Defaults to 1M if no value is
254              given.  -c, --client host | host%device run in client mode, con‐
255              necting  to  host   where the optional %dev will SO_BINDTODEVICE
256              that output interface (requires root and see NOTES)
257
258
259           --connect-only[=n]
260              only perform a TCP connect (or 3WHS) without any data  transfer,
261              useful  to  measure  TCP connect() times. Optional value of n is
262              the total number of connects to do (zero is run  forever.)  Note
263              that -i will rate limit the connects where -P will create bursts
264              and -t will end the client and hence end its connect attempts.
265
266           --connect-retries[= n]
267              number of times to retry a TCP connect at the application level.
268              See  operating  system information on the details of TCP connect
269              related settings.
270
271       -d, --dualtest
272              Do a bidirectional test simultaneous test  using  two  unidirec‐
273              tional sockets
274
275           --fq-rate n[kmgKMG]
276              Set a rate to be used with fair-queueing based socket-level pac‐
277              ing, in bytes or bits per second. Only  available  on  platforms
278              supporting the SO_MAX_PACING_RATE socket option. (Note: Here the
279              suffixes indicate bytes/sec or bits/sec per use of uppercase  or
280              lowercase, respectively)
281
282           --full-duplex
283              run  a  full  duplex test, i.e. traffic in both transmit and re‐
284              ceive directions using the same socket
285
286           --histograms[=binwidth[u],bincount,[lowerci],[upperci]]
287              enable select()/write()  histograms  with  --tcp-write-prefetch.
288              The  binning  can be modified. Bin widths (default 100 microsec‐
289              onds, append u for microseconds, m for milliseconds) bincount is
290              total  bins  (default  10000), ci is confidence interval between
291              0-100% (default lower 5%, upper 95%, 3 stdev 99.7%)
292
293           --incr-dstip
294              increment the destination ip address  when  using  the  parallel
295              (-P) or port range option
296
297           --incr-dstport
298              increment  the  destination port when using the parallel (-P) or
299              port range option
300
301           --incr-srcip
302              increment the source ip address when using the parallel (-P)  or
303              port range option
304
305           --incr-srcport
306              increment  the source ip address when using the parallel (-P) or
307              port range option, requires -B to set the src port
308
309           --ipg n
310              set the inter-packet gap to n (units of seconds) for packets  or
311              within a frame/burst when --isochronous is set
312
313           --isochronous[=fps:mean,stdev]
314              send  isochronous  traffic  with frequency frames per second and
315              load defined by mean and standard deviation using a  log  normal
316              distribution, defaults to 60:20m,0. (Note: Here the suffixes in‐
317              dicate bytes/sec or bits/sec per use of uppercase or  lowercase,
318              respectively.  Also  the  p suffix is supported to set the burst
319              size in packets, e.g. isochronous=2:25p will send two 25  packet
320              bursts every second, or one 25 packet burst every 0.5 seconds.)
321
322           --local-only[=1|0]
323              Set  1  to  limit traffic to the local network only (through the
324              use of SO_DONTROUTE) set to zero otherwise with  optional  over‐
325              ride of compile time default (see configure --default-localonly)
326
327           --near-congestion[=n]
328              Enable TCP write rate limiting per the sampled RTT. The delay is
329              applied after the -l number of bytes  have  completed.  The  op‐
330              tional  value  is the multiplier to the RTT and defines the time
331              delay. This value defaults to 0.5 if it is not set. Values  less
332              than  1  are supported but the value cannot be negative. This is
333              an experimental feature. It is not likely stable  on  live  net‐
334              works. Suggested use is over controlled test networks.
335
336           --no-connect-sync
337              By  default,  parallel  traffic  threads (per -P greater than 1)
338              will synchronize after their TCP  connects  and  prior  to  each
339              sending  traffic, i.e. all the threads first complete (or error)
340              the TCP 3WHS before any traffic thread will start sending.  This
341              option  disables  that  synchronization  such  that each traffic
342              thread will start sending immediately after completing its  suc‐
343              cessful connect.
344
345           --no-udp-fin
346              Don't  perform  the  UDP  final  server to client exchange which
347              means there won't be a final  server  report  displayed  on  the
348              client.  All packets per the test will be from the client to the
349              server and no packets should be sent  in  the  other  direction.
350              It's  highly  suggested that -t be set on the server if this op‐
351              tion is being used.  This is because  there  will  be  only  one
352              trigger  ending  packet  sent  from client to server and if it's
353              lost then the server will continue to run. (Requires ver  2.0.14
354              or better)
355
356       -n, --num n[kmKM]
357              number of bytes to transmit (instead of -t)
358
359           --permit-key [=<value>]
360              Set  a  key  value  that must match the server's value (also set
361              with --permit-key) in order for the  server  to  accept  traffic
362              from the client. TCP only, no UDP support.
363
364       -r, --tradeoff
365              Do  a  bidirectional  test individually - client-to-server, fol‐
366              lowed by a reversed test, server-to-client
367
368           --tcp-quickack
369              Set TCP_QUICKACK on the socket
370
371           --tcp-write-prefetch n[kmKM]
372              Set TCP_NOTSENT_LOWAT on the socket and use event  based  writes
373              per select() on the socket.
374
375           --tcp-write-times
376              Measure the socket write times
377
378       -t, --time n|0
379              time  in seconds to transmit traffic, use zero for infinite (de‐
380              fault is 10 secs)
381
382           --trip-times
383              enable the measurement of end to end  write  to  read  latencies
384              (client and server clocks must be synchronized)
385
386           --txdelay-time
387              time  in seconds to hold back or delay after the TCP connect and
388              prior to the socket writes. For UDP it's the delay  between  the
389              traffic thread starting and the first write.
390
391           --txstart-time n.n
392              set  the  txstart-time  to  n.n  using unix or epoch time format
393              (supports microsecond resolution, e.g 1536014418.123456) An  ex‐
394              ample to delay one second using command substitution is iperf -c
395              192.168.1.10 --txstart-time $(expr $(date +%s) + 1).$(date +%N)
396
397       -B, --bind ip | ip:port | ipv6 -V | [ipv6]:port -V
398              bind src ip addr and optional port as the source of traffic (see
399              NOTES)
400
401       -F, --fileinput name
402              input the data to be transmitted from a file
403
404       -I, --stdin
405              input the data to be transmitted from stdin
406
407       -L, --listenport n
408              port to receive bidirectional tests back on
409
410       -P, --parallel n
411              number of parallel client threads to run
412
413       -R, --reverse
414              reverse  the traffic flow (useful for testing through firewalls,
415              see NOTES)
416
417       -S, --tos n
418              set the socket's IP_TOS (byte) field. Versions 2.1.5 or  greater
419              will  reflect this tos setting back with --reverse or --full-du‐
420              plex option. (Previous versions won't set  tos  on  the  reverse
421              traffic.) Note: use server side --tos-override to override.
422
423       -T, --ttl n
424              time-to-live,  for  multicast  (default 1) -V, --ipv6_domain Set
425              the domain to IPv6 (send packets over IPv6)
426
427       -X, --peerdetect
428              run peer version detection prior to traffic.
429
430       -Z, --linux-congestion algo
431              set TCP congestion control algorithm (Linux only)
432

EXAMPLES

434       TCP tests (client)
435
436       iperf -c <host> -e -i 1
437       ------------------------------------------------------------
438       Client connecting to <host>, TCP port 5001 with pid 5149
439       Write buffer size:  128 KByte
440       TCP window size:  340 KByte (default)
441       ------------------------------------------------------------
442       [  3] local 45.56.85.133 port 49960 connected  with  45.33.58.123  port
443       5001 (ct=3.23 ms)
444       [  ID]  Interval         Transfer     Bandwidth        Write/Err   Rtry
445       Cwnd/RTT        NetPwr
446       [  3] 0.00-1.00 sec   126 MBytes   1.05  Gbits/sec   1006/0           0
447       56K/626 us  210636.47
448       [   3]  1.00-2.00  sec    138 MBytes  1.15 Gbits/sec  1100/0        299
449       483K/3884 us  37121.32
450       [  3] 2.00-3.00 sec   137 MBytes   1.15  Gbits/sec   1093/0          24
451       657K/5087 us  28162.31
452       [   3]  3.00-4.00  sec    126 MBytes  1.06 Gbits/sec  1010/0        284
453       294K/2528 us  52366.58
454       [  3] 4.00-5.00 sec   117  MBytes    980  Mbits/sec   935/0         373
455       487K/2025 us  60519.66
456       [   3]  5.00-6.00  sec    144 MBytes  1.20 Gbits/sec  1149/0          2
457       644K/3570 us  42185.36
458       [  3] 6.00-7.00 sec   126 MBytes   1.06  Gbits/sec   1011/0         112
459       582K/5281 us  25092.56
460       [   3]  7.00-8.00  sec    110  MBytes   922 Mbits/sec  879/0         56
461       279K/1957 us  58871.89
462       [  3] 8.00-9.00 sec   127 MBytes   1.06  Gbits/sec   1014/0          46
463       483K/3372 us  39414.89
464       [   3]  9.00-10.00  sec   132 MBytes  1.11 Gbits/sec  1054/0          0
465       654K/3380 us  40872.75
466       [  3] 0.00-10.00 sec  1.25 GBytes  1.07 Gbits/sec   10251/0        1196
467       -1K/3170 us  42382.03
468
469
470       where (per -e,)
471              ct= TCP connect time (or three way handshake time 3WHS)
472              Write/Err Total number of successful socket writes. Total number
473              of non-fatal socket write errors
474              Rtry Total number of TCP retries
475              Cwnd/RTT (*nix only) TCP congestion window and round  trip  time
476              (sampled where NA indicates no value)
477              NetPwr (*nix only) Network power defined as (throughput / RTT)
478
479
480       TCP tests (server)
481
482       iperf -s -e -i 1 -l 8K
483       ------------------------------------------------------------
484       Server listening on TCP port 5001 with pid 13430
485       Read buffer size: 8.00 KByte
486       TCP window size: 85.3 KByte (default)
487       ------------------------------------------------------------
488       [   4]  local  45.33.58.123  port 5001 connected with 45.56.85.133 port
489       49960
490       [    ID]    Interval           Transfer       Bandwidth           Reads
491       Dist(bin=1.0K)
492       [    4]   0.00-1.00   sec     124   MBytes    1.04   Gbits/sec    22249
493       798:2637:2061:767:2165:1563:589:11669
494       [    4]   1.00-2.00   sec     136   MBytes    1.14   Gbits/sec    24780
495       946:3227:2227:790:2427:1888:641:12634
496       [    4]   2.00-3.00   sec     137   MBytes    1.15   Gbits/sec    24484
497       1047:2686:2218:810:2195:1819:728:12981
498       [    4]   3.00-4.00   sec     126   MBytes    1.06   Gbits/sec    20812
499       863:1353:1546:614:1712:1298:547:12879
500       [    4]   4.00-5.00   sec     117   MBytes     984   Mbits/sec    20266
501       769:1886:1828:589:1866:1350:476:11502
502       [    4]   5.00-6.00   sec     143   MBytes    1.20   Gbits/sec    24603
503       1066:1925:2139:822:2237:1827:744:13843
504       [    4]   6.00-7.00   sec     126   MBytes    1.06   Gbits/sec    22635
505       834:2464:2249:724:2269:1646:608:11841
506       [    4]   7.00-8.00   sec     110   MBytes     921   Mbits/sec    21107
507       842:2437:2747:592:2871:1903:496:9219
508       [    4]   8.00-9.00   sec     126   MBytes    1.06   Gbits/sec    22804
509       1038:1784:2639:656:2738:1927:573:11449
510       [   4]   9.00-10.00   sec     133   MBytes    1.11   Gbits/sec    23091
511       1088:1654:2105:710:2333:1928:723:12550
512       [    4]   0.00-10.02   sec    1.25   GBytes    1.07  Gbits/sec   227306
513       9316:22088:21792:7096:22893:17193:6138:120790
514
515       where (per -e,)
516              Reads Total number of socket reads
517              Dist(bin=size) Eight bin histogram of the socket reads  returned
518              byte  count.  Bin width is set per size. Bins are separated by a
519              colon. In the example, the bins are 0-1K, 1K-2K, .., 7K-8K.
520
521
522       TCP tests (server with --trip-times on client) iperf -s -i 1 -w 4M
523       ------------------------------------------------------------
524       Server listening on TCP port 5001
525       TCP window size: 8.00 MByte (WARNING: requested 4.00 MByte)
526       ------------------------------------------------------------
527       [  4] local 192.168.1.4%eth0 port 5001 connected with 192.168.1.7  port
528       44798 (trip-times) (MSS=1448) (peer 2.0.14-alpha)
529       [   ID]   Interval          Transfer      Bandwidth      Burst  Latency
530       avg/min/max/stdev (cnt/size) inP NetPwr  Reads=Dist
531       [     4]    0.00-1.00    sec     19.0    MBytes       159     Mbits/sec
532       52.314/10.238/117.155/19.779   ms   (151/131717)   1.05   MByte  380.19
533       781=306:253:129:48:18:15:8:4
534       [     4]    1.00-2.00    sec     20.0    MBytes       168     Mbits/sec
535       53.863/21.264/79.252/12.277   ms   (160/131080)   1.08   MByte   389.38
536       771=294:236:126:60:18:24:10:3
537       [     4]    2.00-3.00    sec     18.2    MBytes       153     Mbits/sec
538       58.718/22.000/137.944/20.397   ms   (146/130964)   1.06   MByte  325.64
539       732=299:231:98:52:18:19:10:5
540       [   4]  3.00-4.00   sec    19.7   MBytes     165   Mbits/sec    50.448/
541       8.921/82.728/14.627     ms     (158/130588)      997    KByte    409.00
542       780=300:255:121:58:15:18:7:6
543       [     4]    4.00-5.00    sec     18.8    MBytes       158     Mbits/sec
544       53.826/11.169/115.316/15.541   ms   (150/131420)   1.02   MByte  366.24
545       761=302:226:134:52:22:17:7:1
546       [     4]    5.00-6.00    sec     19.5    MBytes       164     Mbits/sec
547       50.943/11.922/76.134/14.053   ms   (156/131276)   1.03   MByte   402.00
548       759=273:246:149:45:16:18:4:8
549       [     4]    6.00-7.00    sec     18.5    MBytes       155     Mbits/sec
550       57.643/10.039/127.850/18.950   ms   (148/130926)   1.05   MByte  336.16
551       710=262:228:133:37:16:20:8:6
552       [     4]    7.00-8.00    sec     19.6    MBytes       165     Mbits/sec
553       52.498/12.900/77.045/12.979   ms   (157/131003)   1.00   MByte   391.78
554       742=288:200:135:68:16:23:4:8
555       [   4]  8.00-9.00   sec    18.0   MBytes     151   Mbits/sec    58.370/
556       8.026/150.243/21.445     ms     (144/131255)    1.06    MByte    323.81
557       716=268:241:108:51:20:17:8:3
558       [     4]    9.00-10.00    sec     18.4    MBytes      154     Mbits/sec
559       56.112/12.419/79.790/13.668   ms   (147/131194)   1.05   MByte   343.70
560       822=330:303:120:26:16:14:9:4
561       [     4]    10.00-10.06    sec     1.03    MBytes      146    Mbits/sec
562       69.880/45.175/78.754/10.823    ms    (9/119632)   1.74   MByte   260.40
563       62=26:30:5:1:0:0:0:0
564       [   4]  0.00-10.06  sec     191   MBytes     159   Mbits/sec    54.183/
565       8.026/150.243/16.781     ms    (1526/131072)    1.03    MByte    366.98
566       7636=2948:2449:1258:498:175:185:75:48
567
568       where (per -e,)
569              Burst Latency One way TCP write() to read() latency in mean/min‐
570              imum/maximum/standard   deviation  format  (Note:  requires  the
571              client's and server's system clocks to be synchronized to a com‐
572              mon  reference,  e.g.  using  precision time protocol PTP. A GPS
573              disciplined OCXO is a recommended reference.)
574              cnt Number of completed bursts received and used for  the  burst
575              latency calculations
576              size  Average burst size in bytes (computed average and estimate
577              only)
578              inP inP, short for in progress, is the average number  of  bytes
579              in  progress  or  in  flight. This is taken from the application
580              level write to read perspective. Note this is a mean value.  The
581              parenthesis value is the standard deviation from the mean.  (Re‐
582              quires --trip-times on client. See Little's law in NOTES.)
583              NetPwr Network power defined as (throughput / one way latency)
584
585
586       TCP tests (with one way delay sync check -X  and  --trip-times  on  the
587       client)
588
589       iperf -c 192.168.1.4 -X -e --trip-times -i 1 -t 2
590       ------------------------------------------------------------
591       Client  connecting  to  192.168.1.4,  TCP  port  5001 with pid 16762 (1
592       flows)
593       Write buffer size: 131072 Byte
594       TCP window size: 85.0 KByte (default)
595       ------------------------------------------------------------
596       [   1]   Clock   sync   check   (ms):    RTT/Half=(3.361/1.680)    OWD-
597       send/ack/asym=(2.246/1.115/1.131)
598       [   1] local 192.168.1.1%ap0 port 47466 connected with 192.168.1.4 port
599       5001 (MSS=1448) (trip-times) (sock=3) (peer 2.1.4-master)
600       [  ID]  Interval         Transfer     Bandwidth        Write/Err   Rtry
601       Cwnd/RTT        NetPwr
602       [   1]  0.00-1.00  sec   9.50  MBytes   79.7 Mbits/sec  77/0          0
603       2309K/113914 us  87
604       [  1] 1.00-2.00 sec   7.12  MBytes   59.8  Mbits/sec   57/0           0
605       2492K/126113 us  59
606       [   1]  2.00-2.42  sec    128  KBytes   2.47  Mbits/sec  2/0          0
607       2492K/126113 us  2
608       [  1] 0.00-2.42 sec  16.8  MBytes   58.0  Mbits/sec   136/0           0
609       2492K/126113 us  57
610
611
612       UDP tests (client)
613
614       iperf -c <host> -e -i 1 -u -b 10m
615       ------------------------------------------------------------
616       Client connecting to <host>, UDP port 5001 with pid 5169
617       Sending 1470 byte datagrams, IPG target: 1176.00 us (kalman adjust)
618       UDP buffer size:  208 KByte (default)
619       ------------------------------------------------------------
620       [   3]  local  45.56.85.133 port 32943 connected with 45.33.58.123 port
621       5001
622       [ ID] Interval        Transfer     Bandwidth      Write/Err  PPS
623       [  3] 0.00-1.00 sec  1.19 MBytes  10.0 Mbits/sec  852/0      851 pps
624       [  3] 1.00-2.00 sec  1.19 MBytes  10.0 Mbits/sec  850/0      850 pps
625       [  3] 2.00-3.00 sec  1.19 MBytes  10.0 Mbits/sec  850/0      850 pps
626       [  3] 3.00-4.00 sec  1.19 MBytes  10.0 Mbits/sec  851/0      850 pps
627       [  3] 4.00-5.00 sec  1.19 MBytes  10.0 Mbits/sec  850/0      850 pps
628       [  3] 5.00-6.00 sec  1.19 MBytes  10.0 Mbits/sec  850/0      850 pps
629       [  3] 6.00-7.00 sec  1.19 MBytes  10.0 Mbits/sec  851/0      850 pps
630       [  3] 7.00-8.00 sec  1.19 MBytes  10.0 Mbits/sec  850/0      850 pps
631       [  3] 8.00-9.00 sec  1.19 MBytes  10.0 Mbits/sec  851/0      850 pps
632       [  3] 0.00-10.00 sec  11.9 MBytes  10.0 Mbits/sec  8504/0      850 pps
633       [  3] Sent 8504 datagrams
634       [  3] Server Report:
635       [  3] 0.00-10.00 sec  11.9 MBytes  10.0 Mbits/sec   0.047 ms    0/ 8504
636       (0%)  0.537/ 0.392/23.657/ 0.497 ms  850 pps  2329.37
637
638       where (per -e,)
639              Write/Err Total number of successful socket writes. Total number
640              of non-fatal socket write errors
641              PPS Transmit packet rate in packets per second
642
643
644       UDP tests (server) iperf -s -i 1 -w 4M -u
645       ------------------------------------------------------------
646       Server listening on UDP port 5001
647       Receiving 1470 byte datagrams
648       UDP buffer size: 8.00 MByte (WARNING: requested 4.00 MByte)
649       ------------------------------------------------------------
650       [  3] local 192.168.1.4 port 5001 connected with 192.168.1.1 port 60027
651       (WARN:  winsize=8.00  MByte  req=4.00  MByte)  (trip-times) (0.0) (peer
652       2.0.14-alpha)
653       [ ID] Interval        Transfer     Bandwidth        Jitter   Lost/Total
654       Latency avg/min/max/stdev PPS  inP NetPwr
655       [  3] 0.00-1.00 sec  44.5 MBytes   373 Mbits/sec   0.071 ms 52198/83938
656       (62%) 75.185/ 2.367/85.189/14.430 ms 31854 pps 3.64 MByte 620.58
657       [   3]  1.00-2.00  sec   44.8  MBytes    376   Mbits/sec     0.015   ms
658       59549/143701  (41%) 79.609/75.603/85.757/ 1.454 ms 31954 pps 3.56 MByte
659       590.04
660       [   3]  2.00-3.00  sec   44.5  MBytes    373   Mbits/sec     0.017   ms
661       59494/202975  (29%) 80.006/75.951/88.198/ 1.638 ms 31733 pps 3.56 MByte
662       583.07
663       [   3]  3.00-4.00  sec   44.5  MBytes    373   Mbits/sec     0.019   ms
664       59586/262562  (23%) 79.939/75.667/83.857/ 1.145 ms 31767 pps 3.56 MByte
665       583.57
666       [   3]  4.00-5.00  sec   44.5  MBytes    373   Mbits/sec     0.081   ms
667       59612/322196  (19%) 79.882/75.400/86.618/ 1.666 ms 31755 pps 3.55 MByte
668       584.40
669       [   3]  5.00-6.00  sec   44.7  MBytes    375   Mbits/sec     0.064   ms
670       59571/381918  (16%) 79.767/75.571/85.339/ 1.556 ms 31879 pps 3.56 MByte
671       588.02
672       [   3]  6.00-7.00  sec   44.6  MBytes    374   Mbits/sec     0.041   ms
673       58990/440820  (13%) 79.722/75.662/85.938/ 1.087 ms 31820 pps 3.58 MByte
674       586.73
675       [   3]  7.00-8.00  sec   44.7  MBytes    375   Mbits/sec     0.027   ms
676       59679/500548  (12%) 79.745/75.704/84.731/ 1.094 ms 31869 pps 3.55 MByte
677       587.46
678       [   3]  8.00-9.00  sec   44.3  MBytes    371   Mbits/sec     0.078   ms
679       59230/559499  (11%) 80.346/75.514/94.293/ 2.858 ms 31590 pps 3.58 MByte
680       577.97
681       [   3]  9.00-10.00  sec   44.4  MBytes    373  Mbits/sec     0.073   ms
682       58782/618394 (9.5%) 79.125/75.511/93.638/ 1.643 ms 31702 pps 3.55 MByte
683       588.99
684       [   3]  10.00-10.08  sec   3.53  MBytes    367  Mbits/sec    0.129   ms
685       6026/595236  (1%)  94.967/80.709/99.685/  3.560 ms 31107 pps 3.58 MByte
686       483.12
687       [   3]  0.00-10.08  sec    449  MBytes    374  Mbits/sec     0.129   ms
688       592717/913046  (65%)  79.453/  2.367/99.685/  5.200 ms 31776 pps (null)
689       587.91
690
691
692       where (per -e,)
693              Latency End to end latency in mean/minimum/maximum/standard  de‐
694              viation  format (Note: requires the client's and server's system
695              clocks to be synchronized to a common reference, e.g. using pre‐
696              cision  time  protocol  PTP.  A GPS disciplined OCXO is a recom‐
697              mended reference.)
698              PPS Received packet rate in packets per second
699              inP inP, short for in progress, is the average number  of  bytes
700              in  progress  or  in  flight.  This is taken from an application
701              write to read perspective. (Requires --trip-times on client. See
702              Little's law in NOTES.)
703              NetPwr Network power defined as (throughput / latency)
704
705
706       Isochronous UDP tests (client)
707
708       iperf -c 192.168.100.33 -u -e -i 1 --isochronous=60:100m,10m --realtime
709       ------------------------------------------------------------
710       Client connecting to 192.168.100.33, UDP port 5001 with pid 14971
711       UDP  isochronous:  60  frames/sec mean= 100 Mbit/s, stddev=10.0 Mbit/s,
712       Period/IPG=16.67/0.005 ms
713       UDP buffer size:  208 KByte (default)
714       ------------------------------------------------------------
715       [  3] local 192.168.100.76 port  42928  connected  with  192.168.100.33
716       port 5001
717       [   ID]  Interval         Transfer      Bandwidth       Write/Err   PPS
718       frames:tx/missed/slips
719       [  3] 0.00-1.00 sec  12.0 MBytes   101 Mbits/sec  8615/0      8493  pps
720       62/0/0
721       [   3]  1.00-2.00 sec  12.0 MBytes   100 Mbits/sec  8556/0     8557 pps
722       60/0/0
723       [  3] 2.00-3.00 sec  12.0 MBytes   101 Mbits/sec  8586/0      8586  pps
724       60/0/0
725       [   3]  3.00-4.00 sec  12.1 MBytes   102 Mbits/sec  8687/0     8687 pps
726       60/0/0
727       [  3] 4.00-5.00 sec  11.8 MBytes  99.2 Mbits/sec  8468/0      8468  pps
728       60/0/0
729       [   3]  5.00-6.00 sec  11.9 MBytes  99.8 Mbits/sec  8519/0     8520 pps
730       60/0/0
731       [  3] 6.00-7.00 sec  12.1 MBytes   102 Mbits/sec  8694/0      8694  pps
732       60/0/0
733       [   3]  7.00-8.00 sec  12.1 MBytes   102 Mbits/sec  8692/0     8692 pps
734       60/0/0
735       [  3] 8.00-9.00 sec  11.9 MBytes   100 Mbits/sec  8537/0      8537  pps
736       60/0/0
737       [   3] 9.00-10.00 sec  11.8 MBytes  99.0 Mbits/sec  8450/0     8450 pps
738       60/0/0
739       [  3] 0.00-10.01 sec   120 MBytes   100 Mbits/sec  85867/0     8574 pps
740       602/0/0
741       [  3] Sent 85867 datagrams
742       [  3] Server Report:
743       [   3] 0.00-9.98 sec   120 MBytes   101 Mbits/sec   0.009 ms  196/85867
744       (0.23%)  0.665/ 0.083/ 1.318/ 0.174 ms 8605 pps  18903.85
745
746       where (per -e,)
747              frames:tx/missed/slips Total number  of  isochronous  frames  or
748              bursts.  Total  number  of  frame  ids not sent. Total number of
749              frame slips
750
751
752       Isochronous UDP tests (server)
753
754       iperf -s -e -u --udp-histogram=100u,2000 --realtime
755       ------------------------------------------------------------
756       Server listening on UDP port 5001 with pid 5175
757       Receiving 1470 byte datagrams
758       UDP buffer size:  208 KByte (default)
759       ------------------------------------------------------------
760       [  3] local 192.168.100.33 port 5001 connected with 192.168.100.76 port
761       42928 isoch (peer 2.0.13-alpha)
762       [ ID] Interval        Transfer     Bandwidth        Jitter   Lost/Total
763       Latency avg/min/max/stdev PPS  NetPwr  Frames/Lost
764       [  3] 0.00-9.98 sec   120 MBytes   101 Mbits/sec   0.010 ms   196/85867
765       (0.23%)  0.665/ 0.083/ 1.318/ 0.284 ms 8585 pps  18903.85  601/1
766       [             3]           0.00-9.98           sec           T8(f)-PDF:
767       bin(w=100us):cnt(85671)=1:2,2:844,3:10034,4:8493,5:8967,6:8733,7:8823,8:9023,9:8901,10:8816,11:7730,12:4563,13:741,14:1
768       (5.00/95.00%=3/12,Outliers=0,obl/obu=0/0)
769       [             3]           0.00-9.98           sec           F8(f)-PDF:
770       bin(w=100us):cnt(598)=15:2,16:1,17:27,18:68,19:125,20:136,21:103,22:83,23:22,24:23,25:5,26:3
771       (5.00/95.00%=17/24,Outliers=0,obl/obu=0/0)
772
773
774       where, Frames/lost  Total  number of frames (or bursts) received. Total
775              number of bursts lost or error-ed
776              T8-PDF(f) Latency histogram for packets
777              F8-PDF(f) Latency histogram for frames
778
779
780

ENVIRONMENT

782       Note:  The environment variable option settings haven't been maintained
783              well.  See the source code if these are of interest.
784

NOTES

786       Numeric  options:  Some  numeric  options support format characters per
787       '<value>c' (e.g. 10M) where the c format  characters  are  k,m,g,K,M,G.
788       Lowercase format characters are 10^3 based and uppercase are 2^n based,
789       e.g. 1k = 1000, 1K = 1024, 1m = 1,000,000 and 1M = 1,048,576
790
791       Rate limiting: The -b option supports read and write rate  limiting  at
792       the application level.  The -b option on the client also supports vari‐
793       able offered loads through the <mean>,<standard deviation> format, e.g.
794       -b  100m,10m.  The  distribution  used  is  log normal. Similar for the
795       isochronous option. The -b on the server rate limits the reads.  Socket
796       based  pacing  is  also supported using the --fq-rate long option. This
797       will work with the --reverse and --full-duplex options as well.
798
799       Synchronized  clocks:  The  --trip-times  option  indicates  that   the
800       client's  and  server's  clocks are synchronized to a common reference.
801       Network Time Protocol (NTP) or Precision Time Protocol (PTP)  are  com‐
802       monly  used for this. The reference clock(s) error and the synchroniza‐
803       tion protocols will affect the accuracy of any end to end latency  mea‐
804       surements.
805
806       Histograms and non-parametric statisitics: The --histograms option pro‐
807       vides the raw data where nothing is averaged. This is useful  for  non-
808       parametric distribtions, e.g. latency. The standard output does use the
809       central limit theorem to produce average, mininimum, maximum and varia‐
810       tion.  This  loses information when the underlining distribution is not
811       gaussian.  Histograms are supported so this information is made  avail‐
812       able.
813
814       Binding  is  done at the logical level of port and ip address (or layer
815       3) using the -B option and a colon as the separator  between  port  and
816       the ip addr. Binding at the device (or layer 2) level requires the per‐
817       cent (%) as the delimeter (for both the client and the server.)  An ex‐
818       ample  for  src port and ip address is -B 192.168.1.1:6001. To bind the
819       src port only and let the operating system choose the source ip address
820       use  0.0.0.0,  e.g.   -B 0.0.0.0:6001. On the client, the -B option af‐
821       fects the bind(2) system call, and will set the source ip  address  and
822       the  source port, e.g. iperf -c <host> -B 192.168.100.2:6002. This con‐
823       trols the packet's source values but not routing.  These can be confus‐
824       ing in that a route or device lookup may not be that of the device with
825       the configured source IP.  So, for example, if the IP address  of  eth0
826       is used for -B and the routing table for the destination IP address re‐
827       solves the output interface to be eth1, then the  host  will  send  the
828       packet out device eth1 while using the source IP address of eth0 in the
829       packet.  To affect the physical output interface (e.g. dual homed  sys‐
830       tems)  either  use  -c <host>%<dev> (requires root) which bypasses this
831       host route table lookup, or configure policy routing per each -B source
832       address  and  set  the  output  interface  appropriately  in the policy
833       routes. On the server or receive, only packets destined to  -B  IP  ad‐
834       dress  will  be  received. It's also useful for multicast. For example,
835       iperf -s -B 224.0.0.1%eth0 will only accept ip multicast  packets  with
836       dest  ip 224.0.0.1 that are received on the eth0 interface, while iperf
837       -s -B 224.0.0.1 will receive those packets on any  interface,  Finally,
838       the   device   specifier   is  required  for  v6  link-local,  e.g.  -c
839       [v6addr]%<dev> -V, to select the output interface.
840
841       Reverse, full-duplex, dualtest (-d) and tradeoff  (-r):  The  --reverse
842       (-R)  and  --full-duplex  options can be confusing when compared to the
843       older options of --dualtest (-d) and --tradeoff (-r). The newer options
844       of  --reverse and --full-duplex only open one socket and read and write
845       to the same socket descriptor, i.e. use the socket in full duplex mode.
846       The  older  -d and -r open second sockets in the opposite direction and
847       do not use a socket in full duplex mode. Note that full duplex  applies
848       to the socket and not to the network devices and that full duplex sock‐
849       ets are supported by the operating systems regardless if an  underlying
850       network  supports  full  duplex  transmission and reception.  It's sug‐
851       gested to use --reverse if you want to test through a NAT firewall  (or
852       -R  on non-windows systems). This applies role reversal of the test af‐
853       ter opening the full duplex socket.  (Note: Firewall  piercing  may  be
854       required to use -d and -r if a NAT gateway is in the path.)
855
856       Also,  the  --reverse -b <rate> setting behaves differently for TCP and
857       UDP. For TCP it will rate limit the read side, i.e.  the  iperf  client
858       (role reversed to act as a server) reading from the full duplex socket.
859       This will in turn flow control the reverse  traffic  per  standard  TCP
860       congestion control. The --reverse -b <rate> will be applied on transmit
861       (i.e. the server role reversed to act as a client) for UDP since  there
862       is  no flow control with UDP. There is no option to directly rate limit
863       the writes with TCP testing when using --reverse.
864
865       Bounceback The bounceback test allows one to  measure  network  respon‐
866       siveness  (which,  in this test, is an inverse of latency.)  Latency is
867       merely delay in units of time. Latency metrics require one to know  the
868       delay  of what's being measured.  For bounceback it's a client write to
869       a server read followed by a server write and then the client read.  The
870       original  write  is  bounce  backed.  Iperf  2  sets up the socket with
871       TCP_NODELAY and possibly TCP_QUICKACK (unless  disabled).   The  client
872       sends  a small write (which defaults to 100 bytes unless -l is set) and
873       issues a read waiting for the "bounceback" from the server. The  server
874       waits  for a read and then optionally delays before sending the payload
875       back.  This repeats until the traffic ends.
876
877       The TCP_QUICKACK socket option will be enabled during bounceback  tests
878       when  the bounceback-hold is set to a non-zero value. The socket option
879       is applied after every read() on the server and before the  hold  delay
880       call.  It's also applied on the client. Use --bounceback-no-quickack to
881       disable TCP ack delays per the socket.
882
883       TCP Connect times: The TCP connect time (or three way handshake) can be
884       seen  on  the iperf client when the -e (--enhanced) option is set. Look
885       for the ct=<value>  in  the  connected  message,  e.g.in  '[  3]  local
886       192.168.1.4  port  48736  connected with 192.168.1.1 port 5001 (ct=1.84
887       ms)' shows the 3WHS took 1.84 milliseconds.
888
889       Port-range Port ranges are supported using the  hyphen  notation,  e.g.
890       6001-6009.  This  will  cause multiple threads, one per port, on either
891       the listener/server or the client. The user needs to take care that the
892       ports  in  the  port range are available and not already in use per the
893       operating system. The -P is supported on the client and will  apply  to
894       each  destination port within the port range. Finally, this can be used
895       for a workaround for Windows UDP and -P > 1 as Windows doesn't dispatch
896       UDP per a server's connect and the quintuple.
897
898       Packet  per second (pps) calculation The packets per second calculation
899       is done as a derivative, i.e. number of packets divided  by  time.  The
900       time is taken from the previous last packet to the current last packet.
901       It is not the sample interval time. The last packet can land at differ‐
902       ent  times  within  an  interval.  This means that pps does not have to
903       match rx bytes divided by the sample interval.  Also, with --trip-times
904       set,  the  packet  time on receive is set by the sender's write time so
905       pps indicates the end to end pps with --trip-times. The RX pps calcula‐
906       tion is receive side only when -e is set and --trip-times is not set.
907
908       Little's Law in queuing theory is a theorem that determines the average
909       number of items (L) in a stationary queuing system based on the average
910       waiting  time  (W) of an item within a system and the average number of
911       items arriving at the system per unit of time (lambda). Mathematically,
912       it's  L  =  lambda  * W. As used here, the units are bytes. The arrival
913       rate is taken from the writes.
914
915       Network power: The network power (NetPwr) metric is experimental.  It's
916       a convenience function defined as throughput/delay.  For TCP transmits,
917       the delay is the sampled RTT times.  For TCP receives, the delay is the
918       write  to  read  latency.   For  UDP  the delay is the end/end latency.
919       Don't confuse this with the physics  definition  of  power  (delta  en‐
920       ergy/delta  time) but more of a measure of a desirable property divided
921       by an undesirable property. Also note, one must use  -i  interval  with
922       TCP  to  get this as that's what sets the RTT sampling rate. The metric
923       is scaled to assist with human readability.
924
925       Multicast: Iperf 2 supports multicast with a couple of caveats.  First,
926       multicast  streams  cannot  take advantage of the -P option. The server
927       will serialize multicast streams. Also, it's highly encouraged to use a
928       -t on a server that will be used for multicast clients. That is because
929       the single end of traffic packet sent from client  to  server  may  get
930       lost  and there are no redundant end of traffic packets.  Setting -t on
931       the server will kill the server thread in the event this packet is  in‐
932       deed lost.
933
934       TCP_QUICACK:  The TCP_QUICKACK socket applied after every read() on the
935       server
936
937       Fast Sampling: Use ./configure --enable-fastsampling and  then  compile
938       from  source  to  enable four digit (e.g. 1.0000) precision in reports'
939       timestamps. Useful for sub-millisecond sampling.
940

DIAGNOSTICS

942       Use ./configure --enable-thread-debug and then compile from  source  to
943       enable both asserts and advanced debugging of the tool itself.
944

BUGS

946       See https://sourceforge.net/p/iperf2/tickets/
947

AUTHORS

949       Iperf2,  based  from  iperf  (originally written by Mark Gates and Alex
950       Warshavsky), has a goal of maintenance with some  feature  enhancement.
951       Other contributions from Ajay Tirumala, Jim Ferguson, Jon Dugan <jdugan
952       at x1024 dot net>, Feng Qin, Kevin Gibbs, John Estabrook  <jestabro  at
953       ncsa.uiuc.edu>,  Andrew  Gallatin <gallatin at gmail.com>, Stephen Hem‐
954       minger <shemminger at linux-foundation.org>, Tim Auckland <tim.auckland
955       at gmail.com>, Robert J. McMahon <rjmcmahon at rjmcmahon.com>
956

SEE ALSO

958       accept(2),bind(2),close(2),connect(2),fcntl(2),getpeername(2),getsock‐
959       name(2),getsockopt(2),listen(2),read(2),recv(2),select(2),send(2),set‐
960       sockopt(2),shutdown(2),write(2),ip(7),socket(7),tcp(7),udp(7)
961
962       Source code at http://sourceforge.net/projects/iperf2/
963
964       "Unix  Network  Programming,  Volume 1: The Sockets Networking API (3rd
965       Edition) 3rd Edition" by W. Richard Stevens (Author), Bill Fenner  (Au‐
966       thor), Andrew M. Rudoff (Author)
967
968
969
970NLANR/DAST                       January 2022                         IPERF(1)
Impressum