CC_CHD(4)
π cc_chd β the CHD Congestion Control Algorithm π
okay bestie, sit down, hydrate, because we're talking about cc_chd(4) β a congestion control algorithm from the cc_chd kernel interfaces manual, and honestly? she's giving smart girl energy. β¨
πΈ NAME πΈ
cc_chd β the CHD Congestion Control Algorithm, no cap.
π¦ DESCRIPTION π¦
okay so. CHD is basically HD's glow-up. Like, it takes the HD algorithm that lives in cc_hd(4) and levels it all the way up. π
What does it add? Two things, and both are iconic:
- it's tolerant of packet loss that has nothing to do with congestion β so it doesn't panic when the loss isn't even its fault
- it plays so much nicer with traditional loss-based TCP flows, especially when the bottleneck link is lightly multiplexed π«Ά
and just like HD, the algorithm is on a mission: keep network queuing delays below a particular threshold (queue_threshold), and decide whether to shrink the congestion window (cwnd) probabilistically, based on its estimate of the network queuing delay. she's doing math in her head at all times, it's lowkey impressive.
so where does CHD differ from HD? three key aspects, and I'm obsessed:
- The probability of
cwndreduction due to congestion is calculated once per round trip time, instead of every single time an acknowledgement is received likecc_hd(4)does. like, she's not checking her phone every two seconds, she's checking it once per RTT. boundaries. β - Packet losses that happen while the queuing delay is less than
queue_thresholddo not causecwndto be reduced. loss happens, she moves on, no drama π - CHD uses a shadow window to help regain lost transmission opportunities when competing with loss-based TCP flows. sneaky? no. strategic. π
β¨ MIB Variables β¨
the algorithm exposes these tunable variables in the net.inet.tcp.cc.chd branch of the sysctl(3) MIB:
queue_thresholdβ Queueing congestion threshold (qth) in ticks. Default is20.pmaxβ Per RTT maximum backoff probability as a percentage. Default is50.qminβ Minimum queuing delay threshold (qmin) in ticks. Default is5.loss_fairβ If1,cwndis adjusted using the shadow window when a congestion related loss is detected. Default is1.use_maxβ If1, the maximum RTT seen within the measurement period is used as the basic delay measurement for the algorithm, otherwise a sampled RTT measurement is used. Default is1.
π SEE ALSO π
go read these, bestie, they're the whole friend group:
cc_cubic(4), cc_hd(4), cc_htcp(4), cc_newreno(4), cc_vegas(4), h_ertt(4), mod_cc(4), tcp(4), khelp(9), mod_cc(9)
and the academic queen herself:
D. A. Hayes and G. Armitage, βImproved coexistence and loss tolerance for delay based TCP congestion controlβ, in 35th Annual IEEE Conference on Local Computer Networks, 24-31, October 2010. π
π ACKNOWLEDGEMENTS π
Development and testing of this software were made possible in part by grants from the FreeBSD Foundation and Cisco University Research Program Fund at Community Foundation Silicon Valley. funding besties, we love you π«Ά
β HISTORY β
The cc_chd congestion control module first appeared in FreeBSD 9.0.
The module was first released in 2010 by David Hayes whilst working on the NewTCP research project at Swinburne University of Technology's Centre for Advanced Internet Architectures, Melbourne, Australia. more details are available at:
http://caia.swin.edu.au/urp/newtcp/
π AUTHORS π
The cc_chd congestion control module and this manual page were written by David Hayes <david.hayes@ieee.org>. thank you for your service, king π«‘
okay that's the whole page, you ate it, no crumbs. this one came from the Debian crew, dated September 15, 2011 β yes, 2011, she's vintage and still slaying πβ¨π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2010-2011 The FreeBSD Foundation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms