'iperf' Notes

Testing multiple QoS queues with multiple flows:

# AF   DSCP  TOS  TOS-HEX
#      0     0    0x00
# AF11 10    40   0x28
# AF21 18    72   0x48
# AF31 26    104  0x68
# AF41 34    136  0x88
# EF   46    184  0xB8
# CS6  48    192  0xC0
# CS7 56 224 0xE0 #client: iperf -c 10.10.10.10 -i 1 -p 5001 -t 3600 -w 64k -S 0x00 > 5001.txt & iperf -c 10.10.10.10 -i 1 -p 5002 -t 3600 -w 64k -S 0x28 > 5002.txt & iperf -c 10.10.10.10 -i 1 -p 5003 -t 3600 -w 64k -S 0x48 > 5003.txt & iperf -c 10.10.10.10 -i 1 -p 5004 -t 3600 -w 64k -S 0x68 > 5004.txt & iperf -c 10.10.10.10 -i 1 -p 5005 -t 3600 -w 64k -S 0x88 > 5005.txt & iperf -c 10.10.10.10 -i 1 -p 5006 -t 3600 -w 64k -S 0xB8 > 5006.txt & iperf -c 10.10.10.10 -i 1 -p 5007 -t 3600 -w 64k -S 0xC0 > 5007.txt & #server: iperf -s -B 10.10.10.10 -i 1 -w 64k -p 5001 > 5001.txt & iperf -s -B 10.10.10.10 -i 1 -w 64k -p 5002 > 5002.txt & iperf -s -B 10.10.10.10 -i 1 -w 64k -p 5003 > 5003.txt & iperf -s -B 10.10.10.10 -i 1 -w 64k -p 5004 > 5004.txt & iperf -s -B 10.10.10.10 -i 1 -w 64k -p 5005 > 5005.txt & iperf -s -B 10.10.10.10 -i 1 -w 64k -p 5006 > 5006.txt & iperf -s -B 10.10.10.10 -i 1 -w 64k -p 5007 > 5007.txt &

 

Testing 7 QoS queues with UDP instead of DSCP:

#servers:
iperf3 -s -p 5001 -i 1 -V -B 10.0.2.2
iperf3 -s -p 5002 -i 1 -V -B 10.0.2.2
iperf3 -s -p 5003 -i 1 -V -B 10.0.2.2
iperf3 -s -p 5004 -i 1 -V -B 10.0.2.2
iperf3 -s -p 5005 -i 1 -V -B 10.0.2.2
iperf3 -s -p 5006 -i 1 -V -B 10.0.2.2
iperf3 -s -p 5007 -i 1 -V -B 10.0.2.2

#clients:
iperf3 -V -i 1 -S 0 -T DSCP0 -c 10.0.2.2 -p 5001 -u -t 3600 -l 1472 -b 28m
iperf3 -V -i 1 -S 40 -T DSCP10 -c 10.0.2.2 -p 5002 -u -t 3600 -l 1472 -b 5m
iperf3 -V -i 1 -S 72 -T DSCP18 -c 10.0.2.2 -p 5003 -u -t 3600 -l 1472 -b 12m
iperf3 -V -i 1 -S 104 -T DSCP26 -c 10.0.2.2 -p 5004 -u -t 3600 -l 1472 -b 24m
iperf3 -V -i 1 -S 136 -T DSCP34 -c 10.0.2.2 -p 5005 -u -t 3600 -l 1472 -b 24m
iperf3 -V -i 1 -S 184 -T DSCP46 -c 10.0.2.2 -p 5006 -u -t 3600 -l 1472 -b 5m
iperf3 -V -i 1 -S 224 -T DSCP56 -c 10.0.2.2 -p 5007 -u -t 3600 -l 1472 -b 2m

In the above example a different DSCP value is used for each UP stream (to fall into each of the 7 QoS classes being tested). Assuming the connection is rate limited to 100Mbps, this will check the bandwidth guarentees for each traffic class, which have been configured as follows
# Best Effor class == 28% minimum guaranteed
# Application 4 class == 5% minimum guaranteed
# Application 3 class == 12% minimum guaranteed
# Application 2 class == 24% minimum guaranteed
# Application 1 class == 24% minimum guaranteed
# EF class == 5% max policed
# Network class == 2% minimum guaranteed

The iperf3 option "-l" when used in UDP mode specifies the UDP payload size. The iperf3 default payload size for UDP mode is the equivilent of "-l 1448". The option "-l 1472" results in the following packet size:
# 1472 bytes UDP payload
# 8 bytes UDP
# 20 bytes IPv4
# == 1500 bytes of Ethernet payload (sent to the Kernel socket for Tx).
# Kernel adds (SA + DA + EthType + VLAN) Ethernet headers and sends to NIC for Tx:
# == 1518
# NIC adds 4 bytes for CRC and transmits:
# == 1522

iperf3 reports the bps value as pps * "-l" option value.
# -l 1472 == byte packet * 8 == 11776 bits.
# -b 11.8K == 11.8Kbps max Tx rate

The following limits iperf 3 to 1pps and the frame size on the wire will be 1522 bytes,as per above calculations. iperf3 reports 11.8Kbps:

iperf3 -c 10.0.2.2 -p 5001 -u -l 1472 -b 11.8K
[ ID] Interval           Transfer     Bandwidth       Total Datagrams
[  4]   0.00-1.00   sec  1.44 KBytes  11.8 Kbits/sec  1


ethtool reports the Tx rate as 12112 bps / 8 == 1514 bytes. It is excluding the VLAN tag + CRC (1522 * 8 == 12176 bits):

[[email protected]_ucpe_002 scripts]$ sudo ./eth_speed_bps.sh ens2f0
ens2f0: TX 12112 bps (1 pkts/s) RX 12112 bps (1 pkts/s)

Previous page: CIFS/SMB Notes
Next page: IPMI/BMC Config via ipmitool