VyOS 1.4-rolling is currently using default TCP congestion control:
vyos@vyos:~$ sysctl net.core.default_qdisc net.core.default_qdisc = pfifo_fast vyos@vyos:~$ sysctl net.ipv4.tcp_congestion_control net.ipv4.tcp_congestion_control = cubic
Which equals to:
sysctl -w net.core.default_qdisc=pfifo_fast sysctl -w net.ipv4.tcp_congestion_control=cubic
There is a new cool kid in town named BBR (bottleneck bandwidth and round-trip propagation time) which seems to work better when congestion occurs compared to the legacy default methods.
I would like to propose to change the TCP congestion control in VyOS to use BBR:
sysctl -w net.core.default_qdisc=fq sysctl -w net.ipv4.tcp_congestion_control=bbr
And if thats not possible then at least make it available as an config option, something like:
set system option tcp-congestion-control bbr
Available methods:
vyos@vyos:~$ sysctl net.ipv4.tcp_available_congestion_control net.ipv4.tcp_available_congestion_control = reno cubic bbr
NOTE! It seems like BBR isnt compiled in the current linux kernel (6.1.45) used by VyOS, but its available as a module:
vyos@vyos:~$ cat /proc/sys/net/ipv4/tcp_available_congestion_control reno cubic vyos@vyos:~$ grep -i bbr /boot/config-6.1.45-amd64-vyos CONFIG_TCP_CONG_BBR=m
Workaround is to put this in /config/scripts/vyos-preconfig-bootup.script:
/sbin/modprobe tcp_bbr
Along with following in config:
set system sysctl parameter net.core.default_qdisc value 'fq' set system sysctl parameter net.ipv4.tcp_congestion_control value 'bbr'
According to https://github.com/google/bbr/blob/master/Documentation/bbr-quick-start.md there is no longer a strict requirement to install the "fq" qdisc to use BBR but "fq" is claimed to perform better during high load.
Ref:
https://blog.apnic.net/2017/05/09/bbr-new-kid-tcp-block/
https://wiki.defect.ch/os/linux/kernel-tuning
https://www.kernel.org/doc/html/v6.1/admin-guide/sysctl/net.html#default-qdisc
https://www.kernel.org/doc/html/v6.1/networking/ip-sysctl.html?highlight=tcp_congestion_control