CC_VEGAS(4)
π cc_vegas β the Vegas Congestion Control Algorithm π
okay bestie, so this is CC_VEGAS(4), a kernel interfaces manual page (section 4, the β¨kernelβ¨ section, iykyk), and we're about to get into how TCP decides it's been a little too much. buckle up. π
β¨ NAME β¨
cc_vegas β the Vegas Congestion Control Algorithm, no cap. it's a whole vibe and it's literally named after a city. iconic.
πΈ DESCRIPTION πΈ
so the Vegas congestion control algorithm is that girl who doesn't just guess β she does the math. it uses what the authors call the actual and expected transmission rates to figure out whether there's congestion somewhere along the network path. and it looks like this:
actual rate = (total data sent in a RTT) / RTT
expected rate = cwnd / RTTmin
diff = expected - actual
where RTT is the measured instantaneous round trip time, and RTTmin is the smallest round trip time observed during the whole connection. she's keeping receipts. π
the algorithm's whole goal is to keep diff nestled between two little parameters called alpha and beta, so that:
alpha < diff < beta
and here's the drama:
- if
diff > beta, congestion is inferred π andcwndgets decremented by one packet (or the maximum TCP segment size). - if
diff < alpha, thencwndgets incremented by one packet π.
alpha and beta govern the amount of buffering along the path, so basically they're the ones setting the boundaries of the relationship.
also, very important: this implementation was done in a clean-room fashion, and it's based on the paper referenced down in the SEE ALSO section. no peeking at anyone else's homework. π«Ά
π IMPLEMENTATION NOTES π
the time from the transmission of a marked packet until the receipt of an acknowledgement for that packet is measured once per RTT. once. per RTT. she's not clingy.
this implementation does not implement Brakmo's and Peterson's original duplicate ACK policy, because clock ticks in today's machines are not as coarse as they were (i.e. 500ms) back when Vegas was originally designed. times changed, bestie, and the algorithm adapted. π
heads up though β modern TCP recovery processes such as fast retransmit and SACK are enabled by default in the TCP stack. so that's just happening, in the background, the whole time. π¦
π§ MIB Variables π§
the algorithm exposes these tunable variables in the net.inet.tcp.cc.vegas branch of the sysctl(3) MIB:
alphaβ query or set the Vegas alpha parameter as a number of buffers on the path. when you're settingalpha, the value must satisfy:0 < alpha < beta. default is1.betaβ query or set the Vegas beta parameter as a number of buffers on the path. when you're settingbeta, the value must satisfy:0 < alpha < beta. default is3.
π₯ SEE ALSO π₯
go read these next, they're the friend group:
cc_chd(4), cc_cubic(4), cc_hd(4), cc_htcp(4), cc_newreno(4), h_ertt(4), mod_cc(4), tcp(4), khelp(9), mod_cc(9)
and the origin story paper π:
L. S. Brakmo and L. L. Peterson, βTCP Vegas: end to end congestion avoidance on a global internetβ, IEEE J. Sel. Areas Commun., 8, 13, 1465-1480, October 1995.
π«Ά 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. thank u to the funders, fr fr. π
π HISTORY π
the cc_vegas 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. and if you want more details, they're right here:
http://caia.swin.edu.au/urp/newtcp/
β AUTHORS β
the cc_vegas congestion control module and this manual page were written by David Hayes <david.hayes@ieee.org>. absolute main character energy, we love to see it. π
and that's the whole page bestie!! this one came to you from Debian, dated September 15, 2011 β so it's a lil vintage, a lil classic, and it still ate. periodt. π β¨π¦
π¦ 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