xref: /freebsd/share/man/man4/cc_newreno.4 (revision 266f97b5)
1.\"
2.\" Copyright (c) 2009 Lawrence Stewart <lstewart@FreeBSD.org>
3.\" Copyright (c) 2011 The FreeBSD Foundation
4.\" All rights reserved.
5.\"
6.\" Portions of this documentation were written at the Centre for Advanced
7.\" Internet Architectures, Swinburne University of Technology, Melbourne,
8.\" Australia by Lawrence Stewart under sponsorship from the FreeBSD Foundation.
9.\"
10.\" Redistribution and use in source and binary forms, with or without
11.\" modification, are permitted provided that the following conditions
12.\" are met:
13.\" 1. Redistributions of source code must retain the above copyright
14.\"    notice, this list of conditions and the following disclaimer.
15.\" 2. Redistributions in binary form must reproduce the above copyright
16.\"    notice, this list of conditions and the following disclaimer in the
17.\"    documentation and/or other materials provided with the distribution.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
23.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE.
30.\"
31.\" $FreeBSD$
32.\"
33.Dd May 13, 2021
34.Dt CC_NEWRENO 4
35.Os
36.Sh NAME
37.Nm cc_newreno
38.Nd NewReno Congestion Control Algorithm
39.Sh SYNOPSIS
40.In netinet/cc/cc_newreno.h
41.Sh DESCRIPTION
42The NewReno congestion control algorithm is the default for TCP.
43Details about the algorithm can be found in RFC5681.
44.Sh Socket Options
45The
46.Nm
47module supports a number of socket options under TCP_CCALGOOPT (refer to
48.Xr tcp 4
49and
50.Xr mod_cc 9 for details)
51which can
52be set with
53.Xr setsockopt 2
54and tested with
55.Xr getsockopt 2 .
56The
57.Nm
58socket options use this structure defined in
59<sys/netinet/cc/cc_newreno.h>:
60.Bd -literal
61struct cc_newreno_opts {
62	int name;
63	uint32_t val;
64}
65.Ed
66.Bl -tag -width ".Va CC_NEWRENO_BETA_ECN"
67.It Va CC_NEWRENO_BETA
68Multiplicative window decrease factor, specified as a percentage, applied to
69the congestion window in response to a congestion signal per: cwnd = (cwnd *
70CC_NEWRENO_BETA) / 100.
71Default is 50.
72.It Va CC_NEWRENO_BETA_ECN
73Multiplicative window decrease factor, specified as a percentage, applied to
74the congestion window in response to an ECN congestion signal when
75.Va net.inet.tcp.cc.abe=1
76per: cwnd = (cwnd * CC_NEWRENO_BETA_ECN) / 100.
77Default is 80.
78.It Va CC_NEWRENO_ENABLE_HYSTART
79will enable or disable the application of Hystart++.
80The current implementation allows the values 0, 1, 2 and 3.
81A value of 0 (the default) disables the use of Hystart++.
82Setting the value to 1 enables Hystart++.
83Setting the value to 2 enables Hystart++ but also will cause, on exit from Hystart++'s CSS, to
84set the cwnd to the value of where the increase in RTT first began as
85well as setting ssthresh to the flight at send when we exit CSS.
86Setting a value of 3 will keep the setting of the cwnd the same as 2, but will cause ssthresh
87to be set to the average value between the lowest fas rtt (the value cwnd is
88set to) and the fas value at exit of CSS.
89.PP
90Note that currently the only way to enable
91hystart++ is to enable it via socket option.
92When enabling it a value of 1 will enable precise internet-draft behavior
93(subject to any MIB variable settings), other setting (2 and 3) are experimental.
94.El
95.PP
96Note that hystart++ requires the TCP stack be able to call to the congestion
97controller with both the
98.Va newround
99function as well as the
100.Va rttsample
101function.
102Currently the only TCP stacks that provide this feedback to the
103congestion controller is rack.
104.Pp
105.Sh MIB Variables
106The algorithm exposes these variables in the
107.Va net.inet.tcp.cc.newreno
108branch of the
109.Xr sysctl 3
110MIB:
111.Bl -tag -width ".Va beta_ecn"
112.It Va beta
113Multiplicative window decrease factor, specified as a percentage, applied to
114the congestion window in response to a congestion signal per: cwnd = (cwnd *
115beta) / 100.
116Default is 50.
117.It Va beta_ecn
118Multiplicative window decrease factor, specified as a percentage, applied to
119the congestion window in response to an ECN congestion signal when
120.Va net.inet.tcp.cc.abe=1
121per: cwnd = (cwnd * beta_ecn) / 100.
122Default is 80.
123.It Va hystartplusplus.bblogs
124This boolean controls if black box logging will be done for hystart++ events. If set
125to zero (the default) no logging is performed.
126If set to one then black box logs will be generated on all hystart++ events.
127.It Va hystartplusplus.css_rounds
128This value controls the number of rounds that CSS runs for.
129The default value matches the current internet-draft of 5.
130.It Va hystartplusplus.css_growth_div
131This value controls the divisor applied to slowstart during CSS.
132The default value matches the current internet-draft of 4.
133.It Va hystartplusplus.n_rttsamples
134This value controls how many rtt samples must be collected in each round for
135hystart++ to be active.
136The default value matches the current internet-draft of 8.
137.It Va hystartplusplus.maxrtt_thresh
138This value controls the maximum rtt variance clamp when considering if CSS is needed.
139The default value matches the current internet-draft of 16000 (in microseconds).
140For further explanation please see the internet-draft.
141.It Va hystartplusplus.minrtt_thresh
142This value controls the minimum rtt variance clamp when considering if CSS is needed.
143The default value matches the current internet-draft of 4000 (in microseconds).
144For further explanation please see the internet-draft.
145.It Va hystartplusplus.lowcwnd
146This value controls what is the lowest congestion window that the tcp
147stack must be at before hystart++ engages.
148The default value matches the current internet-draft of 16.
149.El
150.Sh SEE ALSO
151.Xr cc_cdg 4 ,
152.Xr cc_chd 4 ,
153.Xr cc_cubic 4 ,
154.Xr cc_dctcp 4 ,
155.Xr cc_hd 4 ,
156.Xr cc_htcp 4 ,
157.Xr cc_vegas 4 ,
158.Xr mod_cc 4 ,
159.Xr tcp 4 ,
160.Xr mod_cc 9
161.Rs
162.%A "Mark Allman"
163.%A "Vern Paxson"
164.%A "Ethan Blanton"
165.%T "TCP Congestion Control"
166.%O "RFC 5681"
167.Re
168.Rs
169.%A "Naeem Khademi"
170.%A "Michael Welzl"
171.%A "Grenville Armitage"
172.%A "Gorry Fairhurst"
173.%T "TCP Alternative Backoff with ECN (ABE)"
174.%O "RFC 8511"
175.Re
176.Sh ACKNOWLEDGEMENTS
177Development and testing of this software were made possible in part by grants
178from the FreeBSD Foundation and Cisco University Research Program Fund at
179Community Foundation Silicon Valley.
180.Sh HISTORY
181The
182.Nm
183congestion control algorithm first appeared in its modular form in
184.Fx 9.0 .
185.Pp
186The module was first released in 2007 by James Healy and Lawrence Stewart whilst
187working on the NewTCP research project at Swinburne University of Technology's
188Centre for Advanced Internet Architectures, Melbourne, Australia, which was made
189possible in part by a grant from the Cisco University Research Program Fund at
190Community Foundation Silicon Valley.
191More details are available at:
192.Pp
193http://caia.swin.edu.au/urp/newtcp/
194.Sh AUTHORS
195.An -nosplit
196The
197.Nm
198congestion control module was written by
199.An James Healy Aq Mt jimmy@deefa.com ,
200.An Lawrence Stewart Aq Mt lstewart@FreeBSD.org
201and
202.An David Hayes Aq Mt david.hayes@ieee.org .
203.Pp
204Support for TCP ABE was added by
205.An Tom Jones Aq Mt tj@enoti.me .
206.Pp
207This manual page was written by
208.An Lawrence Stewart Aq Mt lstewart@FreeBSD.org .
209