BBR Testing Using iperf3
iperf3 has a number of options helpful for BBR testing.
First you need to confirm that your host kernel supports BBR:
> sysctl net.ipv4.tcp_available_congestion_control
and make sure BBR is in the list of available congestion control algorithms, e.g.:
net.ipv4.tcp_available_congestion_control = htcp cubic reno bbr
BBR TCP is available starting in RHEL/CentOS 8.0, Debian 9, and Ubuntu 17. To run BBR TCP on a RHEL/CentOS 7.x host, the easiest way to install a kernel with BBR support is to use the ELRepo kernel. Note that this is BBR v1. BBR v2 is not yet available in a supported kernel as of April 2020.
Here are some example useful iperf3 commands:
#use BBR, and pace at 6Gbps
iperf3 -C bbr --fq-rate 6G -c remote_host
# test both directions at once
iperf3 -C bbr --fq-rate 6G --bidir -c remote_host
BBR TCP is sender side only, so you do not need to worry if the receiver supports BBR. Note that BBR is much more effective when using FQ (fair queuing) to pace packets to at most 90% of line rate.
If you want to do testing with a perfSONAR host, unfortunately pscheduler does not yet support the iperf3 -C or --fq-rate options. Your only choice is to set the congestion control and pacing for the entire sending host as follows:
# set default congestion control algoritm
> sysctl -w net.ipv4.tcp_congestion_control=bbr
# use tc to pace all traffic on the NIC
# $ETH is the name of the ethernet device on your host > tc qdisc add dev $ETH root fq maxrate 6gbit