Skip to content

Commit 7b24b96

Browse files
committed
ci: create .duvet/config.toml
1 parent adc7ba9 commit 7b24b96

File tree

639 files changed

+16788
-16944
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

639 files changed

+16788
-16944
lines changed

.duvet/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
reports/

.duvet/config.toml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
'$schema' = "https://awslabs.github.io/duvet/config/v0.4.0.json"
2+
3+
[[source]]
4+
pattern = "quic/**/*.rs"
5+
6+
[report.html]
7+
enabled = true
8+
issue-link = "https://github.com/aws/s2n-quic/issues"
9+
blob-link = "https://github.com/aws/s2n-quic/blob/${{ GITHUB_SHA || 'main' }}"
10+
11+
[report.json]
12+
enabled = true
13+
14+
[[specification]]
15+
source = "https://www.rfc-editor.org/rfc/rfc8312"
16+
17+
[[specification]]
18+
source = "https://www.rfc-editor.org/rfc/rfc8899"
19+
20+
[[specification]]
21+
source = "https://www.rfc-editor.org/rfc/rfc9000"
22+
23+
[[specification]]
24+
source = "https://www.rfc-editor.org/rfc/rfc9001"
25+
26+
[[specification]]
27+
source = "https://www.rfc-editor.org/rfc/rfc9002"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
target = "https://www.rfc-editor.org/rfc/rfc8312#section-4.2"
2+
3+
# TCP-Friendly Region
4+
#
5+
# Standard TCP performs well in certain types of networks, for example,
6+
# under short RTT and small bandwidth (or small BDP) networks. In
7+
# these networks, we use the TCP-friendly region to ensure that CUBIC
8+
# achieves at least the same throughput as Standard TCP.
9+
#
10+
# The TCP-friendly region is designed according to the analysis
11+
# described in [FHP00]. The analysis studies the performance of an
12+
# Additive Increase and Multiplicative Decrease (AIMD) algorithm with
13+
# an additive factor of alpha_aimd (segments per RTT) and a
14+
# multiplicative factor of beta_aimd, denoted by AIMD(alpha_aimd,
15+
# beta_aimd). Specifically, the average congestion window size of
16+
# AIMD(alpha_aimd, beta_aimd) can be calculated using Eq. 3. The
17+
# analysis shows that AIMD(alpha_aimd, beta_aimd) with
18+
# alpha_aimd=3*(1-beta_aimd)/(1+beta_aimd) achieves the same average
19+
# window size as Standard TCP that uses AIMD(1, 0.5).
20+
#
21+
# AVG_W_aimd = [ alpha_aimd * (1+beta_aimd) /
22+
# (2*(1-beta_aimd)*p) ]^0.5 (Eq. 3)
23+
#
24+
# Based on the above analysis, CUBIC uses Eq. 4 to estimate the window
25+
# size W_est of AIMD(alpha_aimd, beta_aimd) with
26+
# alpha_aimd=3*(1-beta_cubic)/(1+beta_cubic) and beta_aimd=beta_cubic,
27+
# which achieves the same average window size as Standard TCP. When
28+
# receiving an ACK in congestion avoidance (cwnd could be greater than
29+
#
30+
# or less than W_max), CUBIC checks whether W_cubic(t) is less than
31+
# W_est(t). If so, CUBIC is in the TCP-friendly region and cwnd SHOULD
32+
# be set to W_est(t) at each reception of an ACK.
33+
#
34+
# W_est(t) = W_max*beta_cubic +
35+
# [3*(1-beta_cubic)/(1+beta_cubic)] * (t/RTT) (Eq. 4)
36+
37+
[[spec]]
38+
level = "SHOULD"
39+
quote = '''
40+
If so, CUBIC is in the TCP-friendly region and cwnd SHOULD
41+
be set to W_est(t) at each reception of an ACK.
42+
'''
43+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
target = "https://www.rfc-editor.org/rfc/rfc8312#section-4.3"
2+
3+
# Concave Region
4+
#
5+
# When receiving an ACK in congestion avoidance, if CUBIC is not in the
6+
# TCP-friendly region and cwnd is less than W_max, then CUBIC is in the
7+
# concave region. In this region, cwnd MUST be incremented by
8+
# (W_cubic(t+RTT) - cwnd)/cwnd for each received ACK, where
9+
# W_cubic(t+RTT) is calculated using Eq. 1.
10+
11+
[[spec]]
12+
level = "MUST"
13+
quote = '''
14+
In this region, cwnd MUST be incremented by
15+
(W_cubic(t+RTT) - cwnd)/cwnd for each received ACK, where
16+
W_cubic(t+RTT) is calculated using Eq.
17+
'''
18+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
target = "https://www.rfc-editor.org/rfc/rfc8312#section-4.4"
2+
3+
# Convex Region
4+
#
5+
# When receiving an ACK in congestion avoidance, if CUBIC is not in the
6+
# TCP-friendly region and cwnd is larger than or equal to W_max, then
7+
# CUBIC is in the convex region. The convex region indicates that the
8+
# network conditions might have been perturbed since the last
9+
# congestion event, possibly implying more available bandwidth after
10+
# some flow departures. Since the Internet is highly asynchronous,
11+
# some amount of perturbation is always possible without causing a
12+
# major change in available bandwidth. In this region, CUBIC is being
13+
# very careful by very slowly increasing its window size. The convex
14+
# profile ensures that the window increases very slowly at the
15+
# beginning and gradually increases its increase rate. We also call
16+
# this region the "maximum probing phase" since CUBIC is searching for
17+
# a new W_max. In this region, cwnd MUST be incremented by
18+
# (W_cubic(t+RTT) - cwnd)/cwnd for each received ACK, where
19+
# W_cubic(t+RTT) is calculated using Eq. 1.
20+
21+
[[spec]]
22+
level = "MUST"
23+
quote = '''
24+
In this region, cwnd MUST be incremented by
25+
(W_cubic(t+RTT) - cwnd)/cwnd for each received ACK, where
26+
W_cubic(t+RTT) is calculated using Eq.
27+
'''
28+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
target = "https://www.rfc-editor.org/rfc/rfc8312#section-4.5"
2+
3+
# Multiplicative Decrease
4+
#
5+
# When a packet loss is detected by duplicate ACKs or a network
6+
# congestion is detected by ECN-Echo ACKs, CUBIC updates its W_max,
7+
# cwnd, and ssthresh as follows. Parameter beta_cubic SHOULD be set to
8+
# 0.7.
9+
#
10+
# W_max = cwnd; // save window size before reduction
11+
# ssthresh = cwnd * beta_cubic; // new slow-start threshold
12+
# ssthresh = max(ssthresh, 2); // threshold is at least 2 MSS
13+
# cwnd = cwnd * beta_cubic; // window reduction
14+
#
15+
# A side effect of setting beta_cubic to a value bigger than 0.5 is
16+
# slower convergence. We believe that while a more adaptive setting of
17+
# beta_cubic could result in faster convergence, it will make the
18+
# analysis of CUBIC much harder. This adaptive adjustment of
19+
# beta_cubic is an item for the next version of CUBIC.
20+
21+
[[spec]]
22+
level = "SHOULD"
23+
quote = '''
24+
Parameter beta_cubic SHOULD be set to
25+
0.7.
26+
'''
27+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
target = "https://www.rfc-editor.org/rfc/rfc8312#section-4.6"
2+
3+
# Fast Convergence
4+
#
5+
# To improve the convergence speed of CUBIC, we add a heuristic in
6+
# CUBIC. When a new flow joins the network, existing flows in the
7+
# network need to give up some of their bandwidth to allow the new flow
8+
# some room for growth if the existing flows have been using all the
9+
# bandwidth of the network. To speed up this bandwidth release by
10+
# existing flows, the following mechanism called "fast convergence"
11+
# SHOULD be implemented.
12+
#
13+
# With fast convergence, when a congestion event occurs, before the
14+
# window reduction of the congestion window, a flow remembers the last
15+
# value of W_max before it updates W_max for the current congestion
16+
# event. Let us call the last value of W_max to be W_last_max.
17+
#
18+
# if (W_max < W_last_max){ // should we make room for others
19+
# W_last_max = W_max; // remember the last W_max
20+
# W_max = W_max*(1.0+beta_cubic)/2.0; // further reduce W_max
21+
# } else {
22+
# W_last_max = W_max // remember the last W_max
23+
# }
24+
#
25+
# At a congestion event, if the current value of W_max is less than
26+
# W_last_max, this indicates that the saturation point experienced by
27+
# this flow is getting reduced because of the change in available
28+
# bandwidth. Then we allow this flow to release more bandwidth by
29+
# reducing W_max further. This action effectively lengthens the time
30+
# for this flow to increase its congestion window because the reduced
31+
# W_max forces the flow to have the plateau earlier. This allows more
32+
# time for the new flow to catch up to its congestion window size.
33+
#
34+
# The fast convergence is designed for network environments with
35+
# multiple CUBIC flows. In network environments with only a single
36+
# CUBIC flow and without any other traffic, the fast convergence SHOULD
37+
# be disabled.
38+
39+
[[spec]]
40+
level = "SHOULD"
41+
quote = '''
42+
To speed up this bandwidth release by
43+
existing flows, the following mechanism called "fast convergence"
44+
SHOULD be implemented.
45+
'''
46+
47+
[[spec]]
48+
level = "SHOULD"
49+
quote = '''
50+
In network environments with only a single
51+
CUBIC flow and without any other traffic, the fast convergence SHOULD
52+
be disabled.
53+
'''
54+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
target = "https://www.rfc-editor.org/rfc/rfc8312#section-4.8"
2+
3+
# Slow Start
4+
#
5+
# CUBIC MUST employ a slow-start algorithm, when the cwnd is no more
6+
# than ssthresh. Among the slow-start algorithms, CUBIC MAY choose the
7+
# standard TCP slow start [RFC5681] in general networks, or the limited
8+
# slow start [RFC3742] or hybrid slow start [HR08] for fast and long-
9+
# distance networks.
10+
#
11+
# In the case when CUBIC runs the hybrid slow start [HR08], it may exit
12+
# the first slow start without incurring any packet loss and thus W_max
13+
# is undefined. In this special case, CUBIC switches to congestion
14+
# avoidance and increases its congestion window size using Eq. 1, where
15+
# t is the elapsed time since the beginning of the current congestion
16+
# avoidance, K is set to 0, and W_max is set to the congestion window
17+
# size at the beginning of the current congestion avoidance.
18+
19+
[[spec]]
20+
level = "MUST"
21+
quote = '''
22+
CUBIC MUST employ a slow-start algorithm, when the cwnd is no more
23+
than ssthresh.
24+
'''
25+
26+
[[spec]]
27+
level = "MAY"
28+
quote = '''
29+
Among the slow-start algorithms, CUBIC MAY choose the
30+
standard TCP slow start [RFC5681] in general networks, or the limited
31+
slow start [RFC3742] or hybrid slow start [HR08] for fast and long-
32+
distance networks.
33+
'''
34+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
target = "https://www.rfc-editor.org/rfc/rfc8312#section-5.1"
2+
3+
# Fairness to Standard TCP
4+
#
5+
# In environments where Standard TCP is able to make reasonable use of
6+
# the available bandwidth, CUBIC does not significantly change this
7+
# state.
8+
#
9+
# Standard TCP performs well in the following two types of networks:
10+
#
11+
# 1. networks with a small bandwidth-delay product (BDP)
12+
#
13+
# 2. networks with a short RTTs, but not necessarily a small BDP
14+
#
15+
# CUBIC is designed to behave very similarly to Standard TCP in the
16+
# above two types of networks. The following two tables show the
17+
# average window sizes of Standard TCP, HSTCP, and CUBIC. The average
18+
# window sizes of Standard TCP and HSTCP are from [RFC3649]. The
19+
# average window size of CUBIC is calculated using Eq. 6 and the CUBIC
20+
# TCP-friendly region for three different values of C.
21+
#
22+
# +--------+----------+-----------+------------+-----------+----------+
23+
# | Loss | Average | Average | CUBIC | CUBIC | CUBIC |
24+
# | Rate P | TCP W | HSTCP W | (C=0.04) | (C=0.4) | (C=4) |
25+
# +--------+----------+-----------+------------+-----------+----------+
26+
# | 10^-2 | 12 | 12 | 12 | 12 | 12 |
27+
# | 10^-3 | 38 | 38 | 38 | 38 | 59 |
28+
# | 10^-4 | 120 | 263 | 120 | 187 | 333 |
29+
# | 10^-5 | 379 | 1795 | 593 | 1054 | 1874 |
30+
# | 10^-6 | 1200 | 12279 | 3332 | 5926 | 10538 |
31+
# | 10^-7 | 3795 | 83981 | 18740 | 33325 | 59261 |
32+
# | 10^-8 | 12000 | 574356 | 105383 | 187400 | 333250 |
33+
# +--------+----------+-----------+------------+-----------+----------+
34+
#
35+
# Table 1
36+
#
37+
# Table 1 describes the response function of Standard TCP, HSTCP, and
38+
# CUBIC in networks with RTT = 0.1 seconds. The average window size is
39+
# in MSS-sized segments.
40+
#
41+
# +--------+-----------+-----------+------------+-----------+---------+
42+
# | Loss | Average | Average | CUBIC | CUBIC | CUBIC |
43+
# | Rate P | TCP W | HSTCP W | (C=0.04) | (C=0.4) | (C=4) |
44+
# +--------+-----------+-----------+------------+-----------+---------+
45+
# | 10^-2 | 12 | 12 | 12 | 12 | 12 |
46+
# | 10^-3 | 38 | 38 | 38 | 38 | 38 |
47+
# | 10^-4 | 120 | 263 | 120 | 120 | 120 |
48+
# | 10^-5 | 379 | 1795 | 379 | 379 | 379 |
49+
# | 10^-6 | 1200 | 12279 | 1200 | 1200 | 1874 |
50+
# | 10^-7 | 3795 | 83981 | 3795 | 5926 | 10538 |
51+
# | 10^-8 | 12000 | 574356 | 18740 | 33325 | 59261 |
52+
# +--------+-----------+-----------+------------+-----------+---------+
53+
#
54+
# Table 2
55+
#
56+
# Table 2 describes the response function of Standard TCP, HSTCP, and
57+
# CUBIC in networks with RTT = 0.01 seconds. The average window size
58+
# is in MSS-sized segments.
59+
#
60+
# Both tables show that CUBIC with any of these three C values is more
61+
# friendly to TCP than HSTCP, especially in networks with a short RTT
62+
# where TCP performs reasonably well. For example, in a network with
63+
# RTT = 0.01 seconds and p=10^-6, TCP has an average window of 1200
64+
# packets. If the packet size is 1500 bytes, then TCP can achieve an
65+
# average rate of 1.44 Gbps. In this case, CUBIC with C=0.04 or C=0.4
66+
# achieves exactly the same rate as Standard TCP, whereas HSTCP is
67+
# about ten times more aggressive than Standard TCP.
68+
#
69+
# We can see that C determines the aggressiveness of CUBIC in competing
70+
# with other congestion control algorithms for bandwidth. CUBIC is
71+
# more friendly to Standard TCP, if the value of C is lower. However,
72+
# we do not recommend setting C to a very low value like 0.04, since
73+
# CUBIC with a low C cannot efficiently use the bandwidth in long RTT
74+
# and high-bandwidth networks. Based on these observations and our
75+
# experiments, we find C=0.4 gives a good balance between TCP-
76+
# friendliness and aggressiveness of window increase. Therefore, C
77+
# SHOULD be set to 0.4. With C set to 0.4, Eq. 6 is reduced to:
78+
#
79+
# AVG_W_cubic = 1.054 * (RTT^0.75) / (p^0.75) (Eq. 7)
80+
#
81+
# Eq. 7 is then used in the next subsection to show the scalability of
82+
# CUBIC.
83+
84+
[[spec]]
85+
level = "SHOULD"
86+
quote = '''
87+
Therefore, C
88+
SHOULD be set to 0.4.
89+
'''
90+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
target = "https://www.rfc-editor.org/rfc/rfc8312#section-5.8"
2+
3+
# Behavior for Application-Limited Flows
4+
#
5+
# CUBIC does not raise its congestion window size if the flow is
6+
# currently limited by the application instead of the congestion
7+
# window. In case of long periods when cwnd has not been updated due
8+
# to the application rate limit, such as idle periods, t in Eq. 1 MUST
9+
# NOT include these periods; otherwise, W_cubic(t) might be very high
10+
# after restarting from these periods.
11+
12+
[[spec]]
13+
level = "MUST"
14+
quote = '''
15+
1 MUST
16+
NOT include these periods; otherwise, W_cubic(t) might be very high
17+
after restarting from these periods.
18+
'''
19+

0 commit comments

Comments
 (0)