draft-ietf-tcpm-rack-06.txt   draft-ietf-tcpm-rack-07.txt 
TCP Maintenance Working Group Y. Cheng TCP Maintenance Working Group Y. Cheng
Internet-Draft N. Cardwell Internet-Draft N. Cardwell
Intended status: Experimental N. Dukkipati Intended status: Standards Track N. Dukkipati
Expires: May 4, 2020 P. Jha Expires: July 20, 2020 P. Jha
Google, Inc Google, Inc
November 1, 2019 Jan 17, 2020
RACK: a time-based fast loss detection algorithm for TCP RACK: a time-based fast loss detection algorithm for TCP
draft-ietf-tcpm-rack-06 draft-ietf-tcpm-rack-07
Abstract Abstract
This document presents a new TCP loss detection algorithm called RACK This document presents a new TCP loss detection algorithm called RACK
("Recent ACKnowledgment"). RACK uses the notion of time, instead of ("Recent ACKnowledgment"). RACK uses the notion of time, instead of
packet or sequence counts, to detect losses, for modern TCP packet or sequence counts, to detect losses, for modern TCP
implementations that can support per-packet timestamps and the implementations that can support per-packet timestamps and the
selective acknowledgment (SACK) option. It is intended to replace selective acknowledgment (SACK) option. It is intended to replace
the conventional DUPACK threshold approach and its variants, as well the conventional DUPACK threshold approach and its variants, as well
as other nonstandard approaches. as other nonstandard approaches.
skipping to change at page 1, line 38 skipping to change at page 1, line 38
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on May 4, 2020. This Internet-Draft will expire on July 20, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
skipping to change at page 2, line 25 skipping to change at page 2, line 25
capitals, as shown here. In this document, these words will appear capitals, as shown here. In this document, these words will appear
with that interpretation only when in UPPER CASE. Lower case uses of with that interpretation only when in UPPER CASE. Lower case uses of
these words are not to be interpreted as carrying [RFC2119] these words are not to be interpreted as carrying [RFC2119]
significance. significance.
2. Introduction 2. Introduction
This document presents a new loss detection algorithm called RACK This document presents a new loss detection algorithm called RACK
("Recent ACKnowledgment"). RACK uses the notion of time instead of ("Recent ACKnowledgment"). RACK uses the notion of time instead of
the conventional packet or sequence counting approaches for detecting the conventional packet or sequence counting approaches for detecting
losses. RACK deems a packet lost if some packet sent sufficiently losses. RACK deems a packet lost if it has not been delivered and
later has been delivered. It does this by recording packet some packet sent sufficiently later has been delivered. It does this
transmission times and inferring losses using cumulative by recording packet transmission times and inferring losses using
acknowledgments or selective acknowledgment (SACK) TCP options. cumulative acknowledgments or selective acknowledgment (SACK) TCP
options.
In the last couple of years we have been observing several In recent years we have been observing several increasingly common
increasingly common loss and reordering patterns in the Internet: loss and reordering patterns in the Internet:
1. Lost retransmissions. Traffic policers [POLICER16] and burst 1. Slow recovery due to lost retransmissions. Traffic policers
losses often cause retransmissions to be lost again, severely [POLICER16] and burst losses often cause retransmissions to be
increasing TCP latency. lost again. This severely increases latency because the lost
retransmissions can only be recovered by retransmission timeouts
(RTOs).
2. Tail drops. Structured request-response traffic turns more 2. Tail drops. Structured request-response traffic turns more
losses into tail drops. In such cases, TCP is application- losses into tail drops. In such cases, TCP is application-
limited, so it cannot send new data to probe losses and has to limited, so it cannot send new data to probe losses and has to
rely on retransmission timeouts (RTOs). rely on retransmission timeouts (RTOs).
3. Reordering. Link-layer protocols (e.g., 802.11 block ACK), link 3. Reordering. Link-layer protocols (e.g., 802.11 block ACK), link
bonding, or routers' internal load-balancing can deliver TCP bonding, or routers' internal load-balancing can deliver TCP
packets out of order. The degree of such reordering is usually packets out of order. The degree of such reordering is usually
within the order of the path round trip time. within the order of the path round trip time.
skipping to change at page 6, line 8 skipping to change at page 6, line 11
To conclude, the RACK algorithm aims to adapt to small degrees of To conclude, the RACK algorithm aims to adapt to small degrees of
reordering, quickly recover most losses within one to two round reordering, quickly recover most losses within one to two round
trips, and avoid costly retransmission timeouts (RTOs). In the trips, and avoid costly retransmission timeouts (RTOs). In the
presence of reordering, the adaptation algorithm can impose presence of reordering, the adaptation algorithm can impose
sometimes-needless delays when it waits to disambiguate loss from sometimes-needless delays when it waits to disambiguate loss from
reordering, but the penalty for waiting is bounded to one round trip reordering, but the penalty for waiting is bounded to one round trip
and such delays are confined to longer-running flows. and such delays are confined to longer-running flows.
This document provides a concrete and detailed reordering window This document provides a concrete and detailed reordering window
adaptation algorithm for implementors. We note that the specifics of adaptation algorithm for implementers. We note that the specifics of
the algorithm are likely to evolve over time. But that is a separate the algorithm are likely to evolve over time. But that is a separate
engineering optimization that's out of scope for this document. engineering optimization that's out of scope for this document.
5. Requirements 5. Requirements
The reader is expected to be familiar with the definitions given in The reader is expected to be familiar with the definitions given in
the TCP congestion control [RFC5681] and selective acknowledgment the TCP congestion control [RFC5681] and selective acknowledgment
[RFC2018] RFCs. Familiarity with the conservative SACK-based [RFC2018] RFCs. Familiarity with the conservative SACK-based
recovery for TCP [RFC6675] is not expected but helps. recovery for TCP [RFC6675] is not expected but helps.
skipping to change at page 14, line 7 skipping to change at page 14, line 38
If timeout != 0 If timeout != 0
Arm a timer to call RACK_detect_loss() after timeout Arm a timer to call RACK_detect_loss() after timeout
Implementation optimization: looping through packets in the SACK Implementation optimization: looping through packets in the SACK
scoreboard above could be very costly on large-BDP networks since the scoreboard above could be very costly on large-BDP networks since the
inflight could be very large. If the implementation can organize the inflight could be very large. If the implementation can organize the
scoreboard data structures to have packets sorted by the last scoreboard data structures to have packets sorted by the last
(re)transmission time, then the loop can start on the least recently (re)transmission time, then the loop can start on the least recently
sent packet and abort on the first packet sent after RACK.time_ts. sent packet and abort on the first packet sent after RACK.time_ts.
This can be implemented by using a seperate list sorted in time This can be implemented by using a seperate doubly-linked list sorted
order. The implementation inserts the packet at the tail of the list in time order. The implementation inserts the packet at the tail of
when it is (re)transmitted, and removes a packet from the list when the list when it is (re)transmitted, and removes a packet from the
it is delivered or marked lost. We RECOMMEND such an optimization list when it is delivered or marked lost. We RECOMMEND such an
because it enables implementations to support high-BDP networks. optimization because it enables implementations to support high-BDP
This optimization is implemented in Linux and sees orders of networks. This optimization is implemented in Linux and sees orders
magnitude improvement in CPU usage on high-speed WAN networks. of magnitude improvement in CPU usage on high-speed WAN networks.
7.3. Tail Loss Probe: fast recovery for tail losses 7.3. Tail Loss Probe: fast recovery for tail losses
This section describes a supplemental algorithm, Tail Loss Probe This section describes a supplemental algorithm, Tail Loss Probe
(TLP), which leverages RACK to further reduce RTO recoveries. TLP (TLP), which leverages RACK to further reduce RTO recoveries. TLP
triggers fast recovery to quickly repair tail losses that can triggers fast recovery to quickly repair tail losses that can
otherwise be recovered by RTOs only. After an original data otherwise be recovered by RTOs only. After an original data
transmission, TLP sends a probe data segment within one to two RTTs. transmission, TLP sends a probe data segment within one to two RTTs.
The probe data segment can either be new, previously unsent data, or The probe data segment can either be new, previously unsent data, or
a retransmission of previously sent data just below SND.NXT. In a retransmission of previously sent data just below SND.NXT. In
skipping to change at page 18, line 33 skipping to change at page 18, line 46
the arrival of the SACK for segment N provides evidence that the N-1 the arrival of the SACK for segment N provides evidence that the N-1
segments preceding segment N were likely lost. In the case where segments preceding segment N were likely lost. In the case where
there is only one original outstanding segment of data (N=1), the there is only one original outstanding segment of data (N=1), the
same logic (trivially) applies: an ACK for a single outstanding same logic (trivially) applies: an ACK for a single outstanding
segment tells the sender the N-1=0 segments preceding that segment segment tells the sender the N-1=0 segments preceding that segment
were lost. Furthermore, whether there are N>1 or N=1 outstanding were lost. Furthermore, whether there are N>1 or N=1 outstanding
segments, there is a question about whether the original last segment segments, there is a question about whether the original last segment
or its TLP retransmission were lost; the sender estimates this using or its TLP retransmission were lost; the sender estimates this using
TLP recovery detection (see below). TLP recovery detection (see below).
Note that wether a probe was sent or not in TLP_send_probe(), the Note that whether or not a probe was sent in TLP_send_probe(), the
sender MUST arm the RTO timer, not the PTO timer, at the end of sender MUST arm the RTO timer, not the PTO timer, at the end of
TLP_send_probe() if FlightSize is not zero. This ensures that the TLP_send_probe() if FlightSize is not zero. This ensures that the
sender does not send repeated, back-to-back TLP probes. Checking sender does not send repeated, back-to-back TLP probes. Checking
TLPRxtOut prior to sending the loss probe is also critical to avoid TLPRxtOut prior to sending the loss probe is also critical to avoid
TLP loops if an application writes periodically at an interval less TLP loops if an application writes periodically at an interval less
than PTO. than PTO.
7.5.3. Phase 3: ACK processing 7.5.3. Phase 3: ACK processing
On each incoming ACK, the sender should check the conditions in Step On each incoming ACK, the sender should check the conditions in Step
skipping to change at page 24, line 18 skipping to change at page 24, line 30
TLP's requirement for using FACK and retransmitting the the highest- TLP's requirement for using FACK and retransmitting the the highest-
sequenced packet, because RACK is agnostic to packet sequence sequenced packet, because RACK is agnostic to packet sequence
numbers, and uses transmission time instead. Thus TLP could be numbers, and uses transmission time instead. Thus TLP could be
modified to retransmit the first unacknowledged packet, which could modified to retransmit the first unacknowledged packet, which could
improve application latency. improve application latency.
8.5. Interaction with congestion control 8.5. Interaction with congestion control
RACK intentionally decouples loss detection from congestion control. RACK intentionally decouples loss detection from congestion control.
RACK only detects losses; it does not modify the congestion control RACK only detects losses; it does not modify the congestion control
algorithm [RFC5681][RFC6937]. However, RACK may detect losses algorithm [RFC5681][RFC6937]. A packet marked lost by RACK SHOULD
earlier or later than the conventional duplicate ACK threshold NOT be retransmitted until congestion control deems this appropriate.
approach does. A packet marked lost by RACK SHOULD NOT be
retransmitted until congestion control deems this appropriate.
Specifically, Proportional Rate Reduction [RFC6937] SHOULD be used Specifically, Proportional Rate Reduction [RFC6937] SHOULD be used
when using RACK. when using RACK.
RACK is applicable for both fast recovery and recovery after a RACK is applicable for both fast recovery and recovery after a
retransmission timeout (RTO) in [RFC5681]. RACK applies equally to retransmission timeout (RTO) in [RFC5681]. RACK applies equally to
fast recovery and RTO recovery because RACK is purely based on the fast recovery and RTO recovery because RACK is purely based on the
transmission time order of packets. When a packet retransmitted by transmission time order of packets. When a packet retransmitted by
RTO is acknowledged, RACK will mark any unacked packet sent RTO is acknowledged, RACK will mark any unacked packet sent
sufficiently prior to the RTO as lost, because at least one RTT has sufficiently prior to the RTO as lost, because at least one RTT has
elapsed since these packets were sent. elapsed since these packets were sent.
RACK may detect losses faster or slower than the conventional
duplicate ACK threshold approach does. RACK can detect losses faster
by not requiring three DUPACKs, so congestion control may reduce the
congestion window earlier. When the network path has both reordering
and losses, RACK detects losses slower by waiting for the reordering
window to expire. TCP may continue to increase the congestion window
upon receiving ACKs during this time, making the sender more
aggressive. Certain congestion control algorithms can benefit from
accounting for this increase in the congestion window during the
reordering window.
8.5.1. Example: interactions with congestion control
The following simple example compares how RACK and non-RACK loss The following simple example compares how RACK and non-RACK loss
detection interacts with congestion control: suppose a TCP sender has detection interacts with congestion control: suppose a TCP sender has
a congestion window (cwnd) of 20 packets on a SACK-enabled a congestion window (cwnd) of 20 packets on a SACK-enabled
connection. It sends 10 data packets and all of them are lost. connection. It sends 10 data packets and all of them are lost.
Without RACK, the sender would time out, reset cwnd to 1, and Without RACK, the sender would time out, reset cwnd to 1, and
retransmit the first packet. It would take four round trips (1 + 2 + retransmit the first packet. It would take four round trips (1 + 2 +
4 + 3 = 10) to retransmit all the 10 lost packets using slow start. 4 + 3 = 10) to retransmit all the 10 lost packets using slow start.
The recovery latency would be RTO + 4*RTT, with an ending cwnd of 4 The recovery latency would be RTO + 4*RTT, with an ending cwnd of 4
packets due to congestion window validation. packets due to congestion window validation.
skipping to change at page 25, line 41 skipping to change at page 26, line 13
in fact there was no packet loss. In practice this is acceptable, in fact there was no packet loss. In practice this is acceptable,
and potentially even desirable: if there is reverse path congestion and potentially even desirable: if there is reverse path congestion
then reducing cwnd can be prudent. then reducing cwnd can be prudent.
8.7. RACK for other transport protocols 8.7. RACK for other transport protocols
RACK can be implemented in other transport protocols. The algorithm RACK can be implemented in other transport protocols. The algorithm
can be simplified by skipping step 3 if the protocol can support a can be simplified by skipping step 3 if the protocol can support a
unique transmission or packet identifier (e.g. TCP timestamp options unique transmission or packet identifier (e.g. TCP timestamp options
[RFC7323]). For example, the QUIC protocol implements RACK [QUIC- [RFC7323]). For example, the QUIC protocol implements RACK [QUIC-
LR]. The [Sprout] congestion control also independently designed to LR]. The [Sprout] loss detection algorithm was also independently
use a 10ms reordering window to improve its loss detection. designed to use a 10ms reordering window to improve its loss
detection.
9. Experiments and Performance Evaluations 9. Experiments and Performance Evaluations
RACK and TLP have been deployed at Google, for both connections to RACK and TLP have been deployed at Google, for both connections to
users in the Internet and internally. We conducted a performance users in the Internet and internally. We conducted a performance
evaluation experiment for RACK and TLP on a small set of Google Web evaluation experiment for RACK and TLP on a small set of Google Web
servers in Western Europe that serve mostly European and some African servers in Western Europe that serve mostly European and some African
countries. The experiment lasted three days in March 2017. The countries. The experiment lasted three days in March 2017. The
servers were divided evenly into four groups of roughly 5.3 million servers were divided evenly into four groups of roughly 5.3 million
flows each: flows each:
 End of changes. 14 change blocks. 
30 lines changed or deleted 45 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/