]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/mod_cc.4
Remove $FreeBSD$: two-line nroff pattern
[FreeBSD/FreeBSD.git] / share / man / man4 / mod_cc.4
1 .\"
2 .\" Copyright (c) 2010-2011 The FreeBSD Foundation
3 .\"
4 .\" This documentation was written at the Centre for Advanced Internet
5 .\" Architectures, Swinburne University of Technology, Melbourne, Australia by
6 .\" David Hayes and Lawrence Stewart under sponsorship from the FreeBSD
7 .\" Foundation.
8 .\"
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
11 .\" are met:
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\"    notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\"    notice, this list of conditions and the following disclaimer in the
16 .\"    documentation and/or other materials provided with the distribution.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
22 .\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" SUCH DAMAGE.
29 .\"
30 .Dd September 13, 2022
31 .Dt MOD_CC 4
32 .Os
33 .Sh NAME
34 .Nm mod_cc
35 .Nd Modular congestion control
36 .Sh DESCRIPTION
37 The modular congestion control framework allows the TCP implementation to
38 dynamically change the congestion control algorithm used by new and existing
39 connections.
40 Algorithms are identified by a unique
41 .Xr ascii 7
42 name.
43 Algorithm modules can be compiled into the kernel or loaded as kernel modules
44 using the
45 .Xr kld 4
46 facility.
47 .Pp
48 The default algorithm is CUBIC, and all connections use the default unless
49 explicitly overridden using the
50 .Dv TCP_CONGESTION
51 socket option (see
52 .Xr tcp 4
53 for details).
54 The default can be changed using a
55 .Xr sysctl 3
56 MIB variable detailed in the
57 .Sx MIB Variables
58 section below.
59 .Pp
60 Algorithm specific parameters can be set or queried using the
61 .Dv TCP_CCALGOOPT
62 socket option (see
63 .Xr tcp 4
64 for details).
65 Callers must pass a pointer to an algorithm specific data, and specify
66 its size.
67 .Pp
68 Unloading a congestion control module will fail if it is used as a
69 default by any Vnet.
70 When unloading a module, the Vnet default is
71 used to switch a connection to an alternate congestion control.
72 Note that the new congestion control module may fail to initialize its
73 internal memory, if so it will fail the module unload.
74 If this occurs often times retrying the unload will succeed since the temporary
75 memory shortage as the new CC module malloc's memory, that prevented the
76 switch is often transient.
77 .Sh MIB Variables
78 The framework exposes the following variables in the
79 .Va net.inet.tcp.cc
80 branch of the
81 .Xr sysctl 3
82 MIB:
83 .Bl -tag -width ".Va hystartplusplus.css_growth_div"
84 .It Va available
85 Read-only list of currently available congestion control algorithms by name.
86 .It Va algorithm
87 Returns the current default congestion control algorithm when read, and changes
88 the default when set.
89 When attempting to change the default algorithm, this variable should be set to
90 one of the names listed by the
91 .Va net.inet.tcp.cc.available
92 MIB variable.
93 .It Va abe
94 Enable support for RFC 8511,
95 which alters the window decrease factor applied to the congestion window in
96 response to an ECN congestion signal.
97 Refer to individual congestion control man pages to determine if they implement
98 support for ABE and for configuration details.
99 .It Va abe_frlossreduce
100 If non-zero, apply standard beta instead of ABE-beta during ECN-signalled
101 congestion recovery episodes if loss also needs to be repaired.
102 .It Va hystartplusplus.bblogs
103 This boolean controls if black box logging will be done for hystart++ events.
104 If set to zero (the default) no logging is performed.
105 If set to one then black box logs will be generated on all hystart++ events.
106 .It Va hystartplusplus.css_rounds
107 This value controls the number of rounds that CSS runs for.
108 The default value matches the current internet-draft of 5.
109 .It Va hystartplusplus.css_growth_div
110 This value controls the divisor applied to slowstart during CSS.
111 The default value matches the current internet-draft of 4.
112 .It Va hystartplusplus.n_rttsamples
113 This value controls how many rtt samples must be collected in each round for
114 hystart++ to be active.
115 The default value matches the current internet-draft of 8.
116 .It Va hystartplusplus.maxrtt_thresh
117 This value controls the maximum rtt variance clamp when considering if CSS is needed.
118 The default value matches the current internet-draft of 16000 (in microseconds).
119 For further explanation please see the internet-draft.
120 .It Va hystartplusplus.minrtt_thresh
121 This value controls the minimum rtt variance clamp when considering if CSS is needed.
122 The default value matches the current internet-draft of 4000 (in microseconds).
123 For further explanation please see the internet-draft.
124 .El
125 .Pp
126 Each congestion control module may also expose other MIB variables
127 to control their behaviour.
128 Note that both NewReno and CUBIC now support Hystart++ based on the version 3 of the internet-draft.
129 .Sh Kernel Configuration
130 All of the available congestion control modules may also be loaded
131 via kernel configutation options.
132 A kernel configuration is required to have at least one congestion control
133 algorithm built into it via kernel option and a system default specified.
134 Compilation of the kernel will fail if these two conditions are not met.
135 .Sh Kernel Configuration Options
136 The framework exposes the following kernel configuration options.
137 .Bl -tag -width ".Va CC_NEWRENO"
138 .It Va CC_NEWRENO
139 This directive loads the NewReno congestion control algorithm.
140 .It Va CC_CUBIC
141 This directive loads the CUBIC congestion control algorithm and is included
142 in GENERIC by default.
143 .It Va CC_VEGAS
144 This directive loads the vegas congestion control algorithm, note that
145 this algorithm also requires the TCP_HHOOK option as well.
146 .It Va CC_CDG
147 This directive loads the cdg congestion control algorithm, note that
148 this algorithm also requires the TCP_HHOOK option as well.
149 .It Va CC_DCTCP
150 This directive loads the dctcp congestion control algorithm.
151 .It Va CC_HD
152 This directive loads the hd congestion control algorithm, note that
153 this algorithm also requires the TCP_HHOOK option as well.
154 .It Va CC_CHD
155 This directive loads the chd congestion control algorithm, note that
156 this algorithm also requires the TCP_HHOOK option as well.
157 .It Va CC_HTCP
158 This directive loads the htcp congestion control algorithm.
159 .It Va CC_DEFAULT
160 This directive specifies the string that represents the name of the system default algorithm, the GENERIC kernel
161 defaults this to CUBIC.
162 .El
163 .Sh SEE ALSO
164 .Xr cc_cdg 4 ,
165 .Xr cc_chd 4 ,
166 .Xr cc_cubic 4 ,
167 .Xr cc_dctcp 4 ,
168 .Xr cc_hd 4 ,
169 .Xr cc_htcp 4 ,
170 .Xr cc_newreno 4 ,
171 .Xr cc_vegas 4 ,
172 .Xr tcp 4 ,
173 .Xr config 5 ,
174 .Xr config 8 ,
175 .Xr mod_cc 9
176 .Sh ACKNOWLEDGEMENTS
177 Development and testing of this software were made possible in part by grants
178 from the FreeBSD Foundation and Cisco University Research Program Fund at
179 Community Foundation Silicon Valley.
180 .Sh HISTORY
181 The
182 .Nm
183 modular congestion control framework first appeared in
184 .Fx 9.0 .
185 .Pp
186 The framework was first released in 2007 by James Healy and Lawrence Stewart
187 whilst working on the NewTCP research project at Swinburne University of
188 Technology's Centre for Advanced Internet Architectures, Melbourne, Australia,
189 which was made possible in part by a grant from the Cisco University Research
190 Program Fund at Community Foundation Silicon Valley.
191 More details are available at:
192 .Pp
193 http://caia.swin.edu.au/urp/newtcp/
194 .Sh AUTHORS
195 .An -nosplit
196 The
197 .Nm
198 facility was written by
199 .An Lawrence Stewart Aq Mt lstewart@FreeBSD.org ,
200 .An James Healy Aq Mt jimmy@deefa.com
201 and
202 .An David Hayes Aq Mt david.hayes@ieee.org .
203 .Pp
204 This manual page was written by
205 .An David Hayes Aq Mt david.hayes@ieee.org
206 and
207 .An Lawrence Stewart Aq Mt lstewart@FreeBSD.org .