Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent Congestion Time Threshold #2365

Merged
merged 30 commits into from Feb 25, 2019
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a2ab05c
Persistent Congestion Time Threshold
nibanks Jan 23, 2019
8c4cfdb
Some of Ian's comments
nibanks Jan 23, 2019
d85c452
mikkelfj's suggestion
mikkelfj Jan 23, 2019
548e4e3
mikkelfj's suggestion
mikkelfj Jan 23, 2019
b61e20c
Jana's offline suggestions
nibanks Jan 28, 2019
ad66ac0
Merge branch 'pr/persistent-congestion' of https://github.com/nibanks…
nibanks Jan 28, 2019
d750a39
tab to spaces
nibanks Jan 28, 2019
c668cc1
Ian's suggestion
nibanks Jan 28, 2019
be43750
Ian's suggestion
ianswett Jan 28, 2019
08d85ed
More of Ian's suggestions
nibanks Jan 28, 2019
4ec8620
Merge branch 'pr/persistent-congestion' of https://github.com/nibanks…
nibanks Jan 28, 2019
1ecd70b
Fix build error
nibanks Jan 29, 2019
87b2c5b
Merge branch 'master' into pr/persistent-congestion
nibanks Jan 29, 2019
b5f342e
Ian's suggestion
ianswett Jan 29, 2019
e362345
Ian's suggestion
ianswett Jan 29, 2019
a0e507a
Ian's suggestion
ianswett Jan 29, 2019
6fa9b52
More of Ian's suggestions
nibanks Jan 29, 2019
f64efb8
Ian's suggestion
ianswett Jan 30, 2019
931c0cc
Ian's suggestions
nibanks Jan 30, 2019
ed4ad7e
Ian's suggestion
ianswett Jan 30, 2019
91481a3
Merge branch 'master' into pr/persistent-congestion
nibanks Feb 5, 2019
731211f
slight redesign and example
nibanks Feb 7, 2019
d0254cc
forgot to hit save first...
nibanks Feb 7, 2019
be6ce72
whitespace removal
nibanks Feb 8, 2019
4e4b4fb
editorial nits
janaiyengar Feb 8, 2019
68ec0b8
another nit
janaiyengar Feb 8, 2019
08da54a
Ian's suggestion
ianswett Feb 11, 2019
4857ee8
Marten's suggestion
nibanks Feb 12, 2019
a8510b1
Jana's suggestions
nibanks Feb 21, 2019
d81b39d
Change back to largest_lost_packet
ianswett Feb 25, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
127 changes: 16 additions & 111 deletions draft-ietf-quic-recovery.md
Expand Up @@ -645,14 +645,22 @@ packets might cause the sender's bytes in flight to exceed the congestion window
until an acknowledgement is received that establishes loss or delivery of
packets.

## Persistent Congestion

When an ACK frame is received that establishes loss of all in-flight packets
sent prior to a threshold number of consecutive PTOs (pto_count is more than
kPersistentCongestionThreshold, see {{cc-consts-of-interest}}), the network is
considered to be experiencing persistent congestion, and the sender's congestion
window MUST be reduced to the minimum congestion window (kMinimumWindow). This
response of collapsing the congestion window on persistent congestion is
functionally similar to a sender's response on a Retransmission Timeout (RTO) in
TCP {{RFC5681}}.
sent over a long enough period of time, the network is considered to be
experiencing persistent congestion. Commonly, this can be established by
consecutive PTOs, but since the PTO timer is reset when a new ack-eliciting
packet is sent, an explicit duration must be used to account for those cases
where PTOs do not occur or are substantially delayed. This duration is the
equivalent of kPersistentCongestionThreshold consecutive PTOS: smoothed_rtt +
4 * rttvar + max_ack_delay * ((2 ^ kPersistentCongestionThreshold) - 1).

When persistent congestion is established, the sender's congestion window MUST
be reduced to the minimum congestion window (kMinimumWindow). This response of
collapsing the congestion window on persistent congestion is functionally
similar to a sender's response on a Retransmission Timeout (RTO) in TCP
{{RFC5681}}.
nibanks marked this conversation as resolved.
Show resolved Hide resolved

## Pacing {#pacing}

Expand Down Expand Up @@ -1119,110 +1127,7 @@ DetectLostPackets():
We now describe an example implementation of the congestion controller described
in {{congestion-control}}.

## Congestion Avoidance

Slow start exits to congestion avoidance. Congestion avoidance in NewReno
uses an additive increase multiplicative decrease (AIMD) approach that
increases the congestion window by one maximum packet size per
congestion window acknowledged. When a loss is detected, NewReno halves
the congestion window and sets the slow start threshold to the new
congestion window.

## Recovery Period

Recovery is a period of time beginning with detection of a lost packet or an
increase in the ECN-CE counter. Because QUIC does not retransmit packets,
it defines the end of recovery as a packet sent after the start of recovery
being acknowledged. This is slightly different from TCP's definition of
recovery, which ends when the lost packet that started recovery is acknowledged.

The recovery period limits congestion window reduction to once per round trip.
During recovery, the congestion window remains unchanged irrespective of new
losses or increases in the ECN-CE counter.

## Ignoring Loss of Undecryptable Packets

During the handshake, some packet protection keys might not be
available when a packet arrives. In particular, Handshake and 0-RTT packets
cannot be processed until the Initial packets arrive, and 1-RTT packets
cannot be processed until the handshake completes. Endpoints MAY
ignore the loss of Handshake, 0-RTT, and 1-RTT packets that might arrive before
the peer has packet protection keys to process those packets.

## Probe Timeout

Probe packets MUST NOT be blocked by the congestion controller. A sender MUST
however count these packets as being additionally in flight, since these packets
adds network load without establishing packet loss. Note that sending probe
packets might cause the sender's bytes in flight to exceed the congestion window
until an acknowledgement is received that establishes loss or delivery of
packets.

## Persistent Congestion

When an ACK frame is received that establishes loss of all in-flight packets
sent over a long enough period of time, the network is considered to be
experiencing persistent congestion. Commonly, this can be established by
consecutive PTOs, but since the PTO timer is reset when a new ack-eliciting
packet is sent, an explicit duration must be used to account for those cases
where PTOs do not occur or are substantially delayed. This duration is the
equivalent of kPersistentCongestionThreshold consecutive PTOS: smoothed_rtt +
4 * rttvar + max_ack_delay * ((2 ^ kPersistentCongestionThreshold) - 1).

When persistent congestion is established, the sender's congestion window MUST
be reduced to the minimum congestion window (kMinimumWindow). This response of
collapsing the congestion window on persistent congestion is functionally
similar to a sender's response on a Retransmission Timeout (RTO) in TCP
{{RFC5681}}.

## Pacing {#pacing}

This document does not specify a pacer, but it is RECOMMENDED that a sender pace
sending of all in-flight packets based on input from the congestion
controller. For example, a pacer might distribute the congestion window over
the SRTT when used with a window-based controller, and a pacer might use the
rate estimate of a rate-based controller.

An implementation should take care to architect its congestion controller to
work well with a pacer. For instance, a pacer might wrap the congestion
controller and control the availability of the congestion window, or a pacer
might pace out packets handed to it by the congestion controller. Timely
delivery of ACK frames is important for efficient loss recovery. Packets
containing only ACK frames should therefore not be paced, to avoid delaying
their delivery to the peer.

As an example of a well-known and publicly available implementation of a flow
pacer, implementers are referred to the Fair Queue packet scheduler (fq qdisc)
in Linux (3.11 onwards).


## Sending data after an idle period

A sender becomes idle if it ceases to send data and has no bytes in flight. A
sender's congestion window MUST NOT increase while it is idle.

When sending data after becoming idle, a sender MUST reset its congestion window
to the initial congestion window (see Section 4.1 of {{?RFC5681}}), unless it
paces the sending of packets. A sender MAY retain its congestion window if it
paces the sending of any packets in excess of the initial congestion window.

A sender MAY implement alternate mechanisms to update its congestion window
after idle periods, such as those proposed for TCP in {{?RFC7661}}.

## Application Limited Sending

The congestion window should not be increased in slow start or congestion
avoidance when it is not fully utilized. The congestion window could be
under-utilized due to insufficient application data or flow control credit.

A sender that paces packets (see {{pacing}}) might delay sending packets
and not fully utilize the congestion window due to this delay. A sender
should not consider itself application limited if it would have fully
utilized the congestion window without pacing delay.

## Pseudocode

### Constants of interest {#cc-consts-of-interest}
## Constants of interest {#cc-consts-of-interest}

Constants used in congestion control are based on a combination of RFCs,
papers, and common practice. Some may need to be changed or negotiated
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.