Hi All,
Please offer feedback per the following and please forward to relevant and interested parties.
Problem statement: Network devices need to support and, hence, have tests for both high duty cycle and low duty cycle traffic scenarios. Iperf 2.1.1 is proposing two new options to support the latter. From the
man page.
- --burst-period[=n]
- Set the burst period in seconds. Defaults to one second. (Note: assumed use case is low duty cycle traffic bursts)
- --burst-size[=n]
- Set the burst size in bytes. Defaults to 1M if no value is given.
Note that the burst-size is not the same as the -l value. The former is an amount expected to be larger than the write size which is what -l specifies.
These settings will work for both UDP and TCP traffic (though UDP is yet to be coded up.)
Proposed server side output:
[rjmcmahon@localhost iperf2-code]$ iperf -s -e
------------------------------------------------------------
Server listening on TCP port 5001 with pid 28094
Read buffer size: 128 KByte (Dist bin width=16.0 KByte)
TCP window size: 128 KByte (default)
------------------------------------------------------------
[ 1] local 192.168.1.10%enp2s0 port 5001 connected with 192.168.1.113 port 59646 (MSS=1448) (burst-period=2.00) (trip-times) (sock=4) (peer 2.1.1-dev) on 2021-03-18 17:56:25 (PDT)
[ ID] Burst (start-end) Transfer Bandwidth XferTime (DC%) Reads=Dist NetPwr
[ 1] 0.0000-0.0092 sec 1.00 MBytes 911 Mbits/sec 9.214 ms (0.46%) 572=571:0:0:1:0:0:0:0 12
[ 1] 2.0001-2.0092 sec 1.00 MBytes 921 Mbits/sec 9.105 ms (0.46%) 511=511:0:0:0:0:0:0:0 13
[ 1] 4.0006-4.0098 sec 1.00 MBytes 914 Mbits/sec 9.180 ms (0.46%) 404=401:3:0:0:0:0:0:0 12
[ 1] 6.0006-6.0099 sec 1.00 MBytes 898 Mbits/sec 9.338 ms (0.47%) 352=351:0:1:0:0:0:0:0 12
[ 1] 8.0005-8.0097 sec 1.00 MBytes 904 Mbits/sec 9.276 ms (0.46%) 468=467:1:0:0:0:0:0:0 12
[ 1] 0.0000-10.0022 sec 5.13 MBytes 4.30 Mbits/sec 2341=2334:5:1:1:0:0:0:0
where XferTime is the total time to transfer the burst. (With --trip-times this the first write time to the final read time. Without it it's the first read to the final read.)
and DC is a Duty Cycle calculation, i.e. XferTime/burst-period. Also note the Bandwidth calculation is computed per the xfer time,
i.e. packet or read/write events, and doesn't use as sample interval like -i does.
Client side command for the above:
[rjmcmahon@ryzen3950 iperf2-code]$ src/iperf -c 192.168.1.10 --burst-period=2.0 --trip-times
------------------------------------------------------------
Client connecting to 192.168.1.10, TCP port 5001 with pid 29040 (1 flows)
Write buffer size: 131072 Byte
Bursting: 1.00 MByte every 2.00 seconds
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[ 1] local 192.168.1.113%enp6s0 port 59646 connected with 192.168.1.10 port 5001 (MSS=1448) (trip-times) (sock=3) (ct=0.29 ms) on 2021-03-18 17:56:25 (PDT)
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT NetPwr
[ 1] 0.0000-10.0107 sec 5.13 MBytes 4.29 Mbits/sec 43/0 0 127K/1590 us 338
[rjmcmahon@ryzen3950 iperf2-code]$
Background:
Most iperf based testing has been high duty cycle or congested traffic. This allows one to measure things like peak average throughput.
Another aspect of network traffic is how devices respond to low periodic bursts. Things like WiFi aggregation may be impacted. Having precise support for low duty cycle, bursty traffic seems needed for more robust test scenarios.
The transmits are scheduled per
clock_nanosleep and done are a per traffic thread basis. (Things like -P will be supported.)
There are major differences in the server side output (client side output is TBD) per:
- The timestamps are now burst based, start of burst to end of burst
- The burst size is displayed
- Bandwidth calculation is based on start of burst to end of burst and the burst size
- The burst transfer time is provided in units of milliseconds and resolution of microseconds
- A duty cycle output in percentage is provided as a convenience
Note: applying the duty cycle to any specific resource is out of context of this proposal. Basically, time is the resource used here.
Here is another run like above where the burst side is set to 10MBytes, notice the change in the output
[rjmcmahon@localhost iperf2-code]$ iperf -s -e
------------------------------------------------------------
Server listening on TCP port 5001 with pid 28516
Read buffer size: 128 KByte (Dist bin width=16.0 KByte)
TCP window size: 128 KByte (default)
------------------------------------------------------------
[ 1] local 192.168.1.10%enp2s0 port 5001 connected with 192.168.1.113 port 59722 (MSS=1448) (burst-period=2.00) (trip-times) (sock=4) (peer 2.1.1-dev) on 2021-03-18 18:09:33 (PDT)
[ ID] Burst (start-end) Transfer Bandwidth XferTime (DC%) Reads=Dist NetPwr
[ 1] 0.0000-0.0893 sec 10.0 MBytes 940 Mbits/sec 89.434 ms (4.5%) 6234=6233:0:1:0:0:0:0:0 1
[ 1] 2.0004-2.0900 sec 10.0 MBytes 935 Mbits/sec 89.681 ms (4.5%) 6398=6397:1:0:0:0:0:0:0 1
[ 1] 4.0003-4.0899 sec 10.0 MBytes 936 Mbits/sec 89.578 ms (4.5%) 6570=6570:0:0:0:0:0:0:0 1
[ 1] 6.0004-6.0901 sec 10.0 MBytes 935 Mbits/sec 89.727 ms (4.5%) 6436=6436:0:0:0:0:0:0:0 1
[ 1] 8.0004-8.0899 sec 10.0 MBytes 937 Mbits/sec 89.547 ms (4.5%) 5986=5985:1:0:0:0:0:0:0 1
[ 1] 0.0000-10.0019 sec 50.1 MBytes 42.0 Mbits/sec 31686=31683:2:1:0:0:0:0:0
[rjmcmahon@ryzen3950 iperf2-code]$ src/iperf -c 192.168.1.10 --burst-period=2.0 --trip-times --burst-size=10M
------------------------------------------------------------
Client connecting to 192.168.1.10, TCP port 5001 with pid 29299 (1 flows)
Write buffer size: 131072 Byte
Bursting: 10.0 MByte every 2.00 seconds
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[ 1] local 192.168.1.113%enp6s0 port 59722 connected with 192.168.1.10 port 5001 (MSS=1448) (trip-times) (sock=3) (ct=0.38 ms) on 2021-03-18 18:09:33 (PDT)
[ ID] Interval Transfer Bandwidth Write/Err Rtry Cwnd/RTT NetPwr
[ 1] 0.0000-10.0167 sec 50.1 MBytes 42.0 Mbits/sec 403/0 0 142K/516 us 10169
Thanks for taking the time to read this and offering comments or suggestions. Also note that the
current code on the 2-1-1-dev branch is in an early prototype phase with limited testing with no UDP support and client side output still a TBD.
Bob