Today I Learned

BBR and larger TCP buffers for WireGuard tunnels

Default CUBIC congestion control undershoots throughput on WireGuard tunnels. Switching to BBR and increasing TCP buffer sizes made a noticeable difference for torrent racing:

boot.kernel.sysctl = {
  "net.core.default_qdisc" = "fq";
  "net.ipv4.tcp_congestion_control" = "bbr";
  "net.core.rmem_max" = 16777216;
  "net.core.wmem_max" = 16777216;
  "net.ipv4.tcp_rmem" = "4096 87380 16777216";
  "net.ipv4.tcp_wmem" = "4096 65536 16777216";
};

BBR needs fq as the qdisc to work properly.