TCP_BBR(4)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’… TCP_BBR(4) β€” like, the whole manual, but make it make sense

okay bestie, so this is a Kernel Interfaces Manual page and it's about tcp_bbr, which literally stands for TCP Bottleneck Bandwidth and Round-Trip Time Algorithm. yes that's a mouthful, no we're not abbreviating it, it's iconic ✨


🌸 NAME 🌸

tcp_bbr β€” the TCP Bottleneck Bandwidth and Round-Trip Time Algorithm. that's the whole name, she's long, she's worth it πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

so there's two steps and you gotta do both, no skipping 🫢

Step one β€” load the driver as a module at boot time by putting this line in loader.conf(5):

tcp_bbr_load="YES"

Step two β€” to enable the TCP stack you must put this line in sysctl.conf(5):

net.inet.tcp.functions_default=bbr

like, "must" must. not optional. don't come back to me saying it doesn't work if you skipped one 😭


πŸ¦‹ DESCRIPTION πŸ¦‹

so Bottleneck bandwidth and round-trip time (BBR) is a congestion control algorithm, and her whole thing is that she seeks high throughput with a small queue by probing BW and RTT. that's the vibe check she's passing πŸ’…

she's a round-up redesign of congestion control β€” meaning she is not loss-based, not delay-based, not ECN-based, and not AIMD-based. not any of those. we're doing something new here, periodt.

the core design of BBR? it's all about creating a model graph of the network path by estimating the maximum BW and minimum RTT on each ACK. every single ACK, bestie. it's giving main character energy πŸ”₯


🌈 MIB Variables 🌈

the algorithm exposes these scopes in the net.inet.tcp.bbr branch of the sysctl(3) MIB:

  • cwnd β€” Cwnd controls, for example "target cwnd rtt measurement" and "BBR initial window".
  • measure β€” Measurement controls.
  • pacing β€” Connection pacing controls.
  • policer β€” Policer controls, for example "false detection threshold" and "loss threshold".
  • probertt β€” Probe RTT controls.
  • startup β€” Startup controls.
  • states β€” State controls.
  • timeout β€” Time out controls.

and besides all the lil variables inside those scopes, these are also exposed in the net.inet.tcp.bbr branch πŸ‘‡

  • clrlost β€” Clear lost counters.
  • software_pacing β€” Total number of software paced flows.
  • hdwr_pacing β€” Total number of hardware paced flows.
  • enob_no_hdwr_pacing β€” Total number of enobufs for non-hardware paced flows.
  • enob_hdwr_pacing β€” Total number of enobufs for hardware paced flows.
  • rtt_tlp_thresh β€” What divisor for TLP rtt/retran will be added (1=rtt, 2=1/2 rtt etc).
  • reorder_fade β€” Does reorder detection fade, if so how many ms (0 means never).
  • reorder_thresh β€” What factor for rack will be added when seeing reordering (shift right).
  • bb_verbose β€” Should BBR black box logging be verbose.
  • sblklimit β€” When do we start ignoring small sack blocks.
  • resend_use_tso β€” Can resends use TSO?
  • data_after_close β€” Do we hold off sending a RST until all pending data is ack'd.
  • kill_paceout β€” When we hit this many errors in a row, kill the session?
  • error_paceout β€” When we hit an error what is the min to pace out in usec's?
  • cheat_rxt β€” Do we burst 1ms between sends on retransmissions (like rack)?
  • minrto β€” Minimum RTO in ms.

πŸ’– SEE ALSO πŸ’–

go read these too, they're the friend group 🫢

and the reading list, because she's academic AND pretty πŸ“š

  • Neal Cardwell, Yuchung Cheng, Stephen Gunn, Soheil Hassas Yeganeh, and Van Jacobson, β€œBBR: Congestion-Based Congestion Control”, ACM Queue, Vol. 14, September / October 2016.
  • Dominik Scholz, Benedikt Jaeger, Lukas Schwaighofer, Daniel Raumer, Fabien Geyer, and Georg Carle, β€œTowards a Deeper Understanding of TCP BBR Congestion Control”, IFIP Networking 2018, http://www.net.in.tum.de/fileadmin/bibtex/publications/papers/IFIP-Networking-2018-TCP-BBR.pdf, May 2018.

⭐ HISTORY ⭐

the tcp_bbr congestion control module first appeared in FreeBSD 13.0. slay, she's a 13.0 girlie πŸŽ€


πŸ‘‘ AUTHORS πŸ‘‘

the tcp_bbr congestion control module was written by Randall Stewart <rrs@FreeBSD.org> and sponsored by Netflix, Inc. β€” yes that Netflix, no cap πŸ”₯

this manual page was written by Gordon Bergling <gbe@FreeBSD.org>. thank you Gordon, we love a documenter πŸ’œ


ngl bestie, if you're gonna mess with these sysctls on a live system, know what you're doing first β€” the page tells you what everything is, not what happens if you get it wrong πŸ™ˆ

okay that's the whole page!! πŸ¦‹ she's from Debian, dated December 17, 2023, and she ate fr fr πŸ’…βœ¨

πŸ“¦ where this page comes from