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