CC_NEWRENO(4)

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

πŸ’– cc_newreno(4) β€” NewReno Congestion Control Algorithm πŸ’–

okay so bestie, you're reading a kernel interfaces manual page (that's the "4" in CC_NEWRENO(4) btw, iykyk) and it's literally about the NewReno congestion control algorithm. yes it's old, yes it's iconic, and yes it ATE. let's get into it 🫢


✨ NAME ✨

cc_newreno β€” the NewReno Congestion Control Algorithm. main character energy, honestly πŸ‘‘


🌸 SYNOPSIS 🌸

#include <netinet/cc/cc_newreno.h>

that's it, that's the vibe check πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so if you want the actual algorithm tea, all the details live in RFC5681 β€” go read that, it's giving source material πŸ“š

πŸŽ€ Socket Options πŸŽ€

the cc_newreno module is lowkey stacked with socket options under TCP_CCALGOOPT β€” and if you need the full deets on that, go check tcp(4) and mod_cc(9), they've got you πŸ’–. you set these bad boys with setsockopt(2) and you test them with getsockopt(2).

the cc_newreno socket options use this structure, which is defined in <sys/netinet/cc/cc_newreno.h>:

struct cc_newreno_opts {
        int name;
        uint32_t val;
}

(no cap, that's the exact struct, don't @ me 🫢)

  • CC_NEWRENO_BETA β€” the multiplicative window decrease factor, specified as a percentage, applied to the congestion window in response to a congestion signal per: cwnd = (cwnd * CC_NEWRENO_BETA) / 100. default is 50. ✨
  • CC_NEWRENO_BETA_ECN β€” the multiplicative window decrease factor, specified as a percentage, applied to the congestion window in response to an ECN congestion signal when net.inet.tcp.cc.abe=1 per: cwnd = (cwnd * CC_NEWRENO_BETA_ECN) / 100. default is 80. 🌈
okay important side note bestie: currently the only way to enable hystart++ is to enable it via socket option. when you enable it, a value of 1 will enable precise internet-draft (version 4) behavior (subject to any MIB variable settings), and the other settings (2 and 3) are experimental. πŸ™ˆ
also hi, another caveat: hystart++ requires the TCP stack be able to call to the congestion controller with both the newround function as well as the rttsample function. currently the only TCP stacks that provide this feedback to the congestion controller is rack. so like… keep that in mind πŸ’€

🧚 MIB Variables 🧚

the algorithm exposes these variables in the net.inet.tcp.cc.newreno branch of the sysctl(3) MIB:

  • beta β€” the multiplicative window decrease factor, specified as a percentage, applied to the congestion window in response to a congestion signal per: cwnd = (cwnd * beta) / 100. default is 50. πŸ’œ
  • beta_ecn β€” the multiplicative window decrease factor, specified as a percentage, applied to the congestion window in response to an ECN congestion signal when net.inet.tcp.cc.abe=1 per: cwnd = (cwnd * beta_ecn) / 100. default is 80. πŸ“

πŸ”₯ SEE ALSO πŸ”₯

Mark Allman, Vern Paxson, and Ethan Blanton, TCP Congestion Control, RFC 5681. πŸ“–

Naeem Khademi, Michael Welzl, Grenville Armitage, and Gorry Fairhurst, TCP Alternative Backoff with ECN (ABE), RFC 8511. πŸ“–


⭐ ACKNOWLEDGEMENTS ⭐

development and testing of this software were made possible in part by grants from the FreeBSD Foundation and the Cisco University Research Program Fund at Community Foundation Silicon Valley. shoutout, fr fr πŸ«ΆπŸ’–


🌈 HISTORY 🌈

the cc_newreno congestion control algorithm first appeared in its modular form in FreeBSD 9.0. ⭐

this was the default congestion control algorithm in FreeBSD before version FreeBSD 14.0, after which cc_cubic(4) replaced it. so yeah, it passed the crown πŸ‘‘πŸ˜­

the module was first released in 2007 by James Healy and Lawrence Stewart whilst working on the NewTCP research project at Swinburne University of Technology's Centre for Advanced Internet Architectures, Melbourne, Australia, which was made possible in part by a grant from the Cisco University Research Program Fund at Community Foundation Silicon Valley. more details are available at:

http://caia.swin.edu.au/urp/newtcp/

πŸŽ€ AUTHORS πŸŽ€

the cc_newreno congestion control module was written by James Healy <jimmy@deefa.com>, Lawrence Stewart <lstewart@FreeBSD.org> and David Hayes <david.hayes@ieee.org>. πŸ’…

support for TCP ABE was added by Tom Jones <tj@enoti.me>. πŸ’œ

this manual page was written by Lawrence Stewart <lstewart@FreeBSD.org>. πŸ¦‹


and that's the whole page bestie, you ate that reading session ngl πŸ“βœ¨ this was a Debian production, dated February 4, 2023 β€” mwah, go touch some grass now πŸ’–πŸŽ€πŸŒˆ

πŸ“¦ where this page comes from