CC_DCTCP(4)

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

πŸ¦‹ cc_dctcp β€” the DCTCP Congestion Control Algorithm πŸ¦‹

okay bestie so this is a page from the Kernel Interfaces Manual, and it's literally about the DCTCP congestion control algorithm. buckle up, it's giving data center energy ✨


πŸ’– NAME πŸ’–

cc_dctcp β€” the DCTCP Congestion Control Algorithm. that's it, that's the whole name. iconic.


🌸 DESCRIPTION 🌸

so DCTCP stands for data center TCP, and its whole thing β€” its main character mission β€” is to maximise throughput and minimise latency in data center networks. how? by using the proportion of Explicit Congestion Notification (ECN) marks it gets from hardware that's capable of doing that, as a congestion signal. slay πŸ’…

DCTCP uses the fraction of ECN marked packets to update the congestion window. the window reduction ratio is always <= 1/2. like, only when all of the packets are marked does the congestion window get halved. periodt.

so to keep the ECN marked fraction accurate, a DCTCP receiver mirrors back incoming (or missing) CE marks by setting (or clearing) ECE marks. this feedback methodology is also adopted when the receiver uses delayed ACK. no cap, it's the same system 🫢

the FreeBSD DCTCP implementation has two minor modifications for the one-sided deployment:

  • considering the situation where DCTCP is used as sender and classic ECN is used as receiver β€” DCTCP sets the CWR flag as the reaction to the ECE flag ✨
  • also, when classic ECN is used as sender and DCTCP is used as receiver, DCTCP avoids mirroring back ACKs only when the CWR flag is set in the incoming packet πŸ‘‘

the other specifications are based on the paper and the RFC referenced in the SEE ALSO section below. go look, iykyk πŸ“š


πŸŽ€ MIB Variables πŸŽ€

the algorithm exposes the following tunable variables in the net.inet.tcp.cc.dctcp branch of the sysctl(3) MIB:

  • alpha β€” the initial value used to estimate the congestion on the link. valid range is from 0 to 1024, where 1024 reduces the congestion window to half if a CE is observed in the first window and alpha could not yet adjust to the congestion level on that path. default is 1024. πŸ’œ
  • shift_g β€” an estimation gain in the alpha calculation. this influences the responsiveness when adjusting alpha to the most recent observed window. valid range from 0 to 10, default is 4, which results in an effective gain of 1 / ( 2 ^ shift_g ), or 1/16th. math girlie hours πŸ”₯
  • slowstart β€” a flag for whether the congestion window should be reduced by one half after slow start. valid settings 0 and 1, default 0. πŸ“
  • ect1 β€” controls whether a DCTCP session should use IP ECT(0) marking when sending out segments (this is the default), or ECT(1) marking, making use of L4S infrastructure. changes to this setting will only affect new sessions β€” existing sessions will retain their previous marking value. so like, no takesie-backsies for sessions already in flight πŸ’€

🌈 SEE ALSO 🌈

and the reading list, because citations are cute actually πŸ“–:

Mohammad Alizadeh, Albert Greenberg, David A. Maltz, Jitendra Padhye, Parveen Patel, Balaji Prabhakar, Sudipta Sengupta, and Murari Sridharan, β€œData Center TCP (DCTCP)”, ACM SIGCOMM 2010, http://research.microsoft.com/pubs/121386/dctcp-public.pdf, 63-74, July 2010.

Stephen Bensley, Dave Thaler, Praveen Balasubramanian, Lars Eggert, and Glenn Judd, Data Center TCP (DCTCP): TCP Congestion Control for Data Centers, https://tools.ietf.org/html/rfc8257.


⭐ HISTORY ⭐

the cc_dctcp congestion control module first appeared in FreeBSD 11.0. πŸŽ‰

and the module was first released in 2014 by Midori Kato, studying at Keio University, Japan. she ate and left no crumbs πŸ‘‘


πŸ’… AUTHORS πŸ’…

the cc_dctcp congestion control module and this manual page were written by Midori Kato katoon@sfc.wide.ad.jp and Lars Eggert lars@netapp.com, with help and modifications from Hiren Panchasara hiren@FreeBSD.org. teamwork makes the dream work fr fr 🫢


and that's the whole page bestie!! big shoutout to Debian, this version is dated November 8, 2022 β€” mwah, love u, go read cc_cubic(4) next πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from