draft-ietf-tcpm-rack-00.txt   draft-ietf-tcpm-rack-01.txt 
TCP Maintenance Working Group Y. Cheng TCP Maintenance Working Group Y. Cheng
Internet-Draft N. Cardwell Internet-Draft N. Cardwell
Intended status: Experimental Google, Inc Intended status: Experimental N. Dukkipati
Expires:March 17, 2017 September 16, 2016 Expires: May 4, 2017 Google, Inc
October 31, 2016
RACK: a time-based fast loss detection algorithm for TCP RACK: a time-based fast loss detection algorithm for TCP
draft-ietf-tcpm-rack-00 draft-ietf-tcpm-rack-01
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 36 skipping to change at page 1, line 37
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 http://datatracker.ietf.org/drafts/current/. Drafts is at http://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 March 7, 2017. This Internet-Draft will expire on May 4, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2016 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
(http://trustee.ietf.org/license-info) in effect on the date of (http://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
skipping to change at page 4, line 19 skipping to change at page 4, line 19
1. The connection MUST use selective acknowledgment (SACK) options 1. The connection MUST use selective acknowledgment (SACK) options
[RFC2018]. [RFC2018].
2. For each packet sent, the sender MUST store its most recent 2. For each packet sent, the sender MUST store its most recent
transmission time with (at least) millisecond granularity. For transmission time with (at least) millisecond granularity. For
round-trip times lower than a millisecond (e.g., intra-datacenter round-trip times lower than a millisecond (e.g., intra-datacenter
communications) microsecond granularity would significantly help communications) microsecond granularity would significantly help
the detection latency but is not required. the detection latency but is not required.
3. For each packet sent, the sender MUST store whether the packet 3. For each packet sent, the sender MUST remember whether the packet
has been retransmitted or not. has been retransmitted or not.
We assume that requirement 1 implies the sender keeps a SACK We assume that requirement 1 implies the sender keeps a SACK
scoreboard, which is a data structure to store selective scoreboard, which is a data structure to store selective
acknowledgment information on a per-connection basis. For the ease acknowledgment information on a per-connection basis. For the ease
of explaining the algorithm, we use a pseudo-scoreboard that manages of explaining the algorithm, we use a pseudo-scoreboard that manages
the data in sequence number ranges. But the specifics of the data the data in sequence number ranges. But the specifics of the data
structure are left to the implementor. structure are left to the implementor.
RACK does not need any change on the receiver. RACK does not need any change on the receiver.
4. Definitions of variables 4. Definitions of variables
A sender needs to store these new RACK variables: A sender needs to store these new RACK variables:
"Packet.xmit_ts" is the time of the last transmission of a data "Packet.xmit_ts" is the time of the last transmission of a data
packet, including any retransmissions, if any. The sender needs to packet, including retransmissions, if any. The sender needs to
record the transmission time for each packet sent and not yet record the transmission time for each packet sent and not yet
acknowledged. The time MUST be stored at millisecond granularity or acknowledged. The time MUST be stored at millisecond granularity or
finer. finer.
"RACK.xmit_ts" is the most recent Packet.xmit_ts among all the "RACK.packet". Among all the packets that have been either
packets that were delivered (either cumulatively acknowledged or selectively or cummulatively acknowledged, RACK.packet is the one
selectively acknowledged) on the connection. that was sent most recently (including retransmission).
"RACK.end_seq" is the ending TCP sequence number of the packet that "RACK.xmit_ts" is the latest transmission timestamp of RACK.packet.
was used to record the RACK.xmit_ts above.
"RACK.end_seq" is the ending TCP sequence number of RACk.packet.
"RACK.RTT" is the associated RTT measured when RACK.xmit_ts, above, "RACK.RTT" is the associated RTT measured when RACK.xmit_ts, above,
was changed. It is the RTT of the most recently transmitted packet was changed. It is the RTT of the most recently transmitted packet
that has been delivered (either cumulatively acknowledged or that has been delivered (either cumulatively acknowledged or
selectively acknowledged) on the connection. selectively acknowledged) on the connection.
"RACK.reo_wnd" is a reordering window for the connection, computed in "RACK.reo_wnd" is a reordering window for the connection, computed in
the unit of time used for recording packet transmission times. It is the unit of time used for recording packet transmission times. It is
used to defer the moment at which RACK marks a packet lost. used to defer the moment at which RACK marks a packet lost.
"RACK.min_RTT" is the estimated minimum round-trip time (RTT) of the "RACK.min_RTT" is the estimated minimum round-trip time (RTT) of the
connection. connection.
"RACK.ack_ts" is the time when all the sequences in RACK.packet were
selectively or cumulatively acknowledged.
Note that the Packet.xmit_ts variable is per packet in flight. The Note that the Packet.xmit_ts variable is per packet in flight. The
RACK.xmit_ts, RACK.RTT, RACK.reo_wnd, and RACK.min_RTT variables are RACK.xmit_ts, RACK.RTT, RACK.reo_wnd, and RACK.min_RTT variables are
per connection. to keep in TCP control block per connection. RACK.packet and
RACK.ack_ts are used as local variables in the algorithm.
5. Algorithm Details 5. Algorithm Details
5.1. Transmitting a data packet 5.1. Transmitting a data packet
Upon transmitting a new packet or retransmitting an old packet, Upon transmitting a new packet or retransmitting an old packet,
record the time in Packet.xmit_ts. RACK does not care if the record the time in Packet.xmit_ts. RACK does not care if the
retransmission is triggered by an ACK, new application data, an RTO, retransmission is triggered by an ACK, new application data, an RTO,
or any other means. or any other means.
skipping to change at page 6, line 44 skipping to change at page 6, line 48
given packet lost. Using the basic algorithm above, the sender would given packet lost. Using the basic algorithm above, the sender would
wait for the next ACK to further advance RACK.xmit_ts; but this risks wait for the next ACK to further advance RACK.xmit_ts; but this risks
a timeout (RTO) if no more ACKs come back (e.g, due to losses or a timeout (RTO) if no more ACKs come back (e.g, due to losses or
application limit). For timely loss detection, the sender MAY application limit). For timely loss detection, the sender MAY
install a "reordering settling" timer set to fire at the earliest install a "reordering settling" timer set to fire at the earliest
moment at which it is safe to conclude that some packet is lost. The moment at which it is safe to conclude that some packet is lost. The
earliest moment is the time it takes to expire the reordering window earliest moment is the time it takes to expire the reordering window
of the earliest unacked packet in flight. of the earliest unacked packet in flight.
This timer expiration value can be derived as follows. As a starting This timer expiration value can be derived as follows. As a starting
point, we consider that the reordering window has passed if the RACK point, we consider that the reordering window has passed if the
packet was sent sufficiently after the packet in question, or a RACK.packet was sent sufficiently after the packet in question, or a
sufficient time has elapsed since the RACK packet was S/ACKed, or sufficient time has elapsed since the RACK.packet was S/ACKed, or
some combination of the two. More precisely, RACK marks a packet as some combination of the two. More precisely, RACK marks a packet as
lost if the reordering window for a packet has elapsed through the lost if the reordering window for a packet has elapsed through the
sum of: sum of:
1. delta in transmit time between a packet and the RACK packet 1. delta in transmit time between a packet and the RACK.packet
2. delta in time between the S/ACK of the RACK packet (RACK.ack_ts)
and now 2. delta in time between when RACK.ack_ts and now
So we mark a packet as lost if: So we mark a packet as lost if:
RACK.xmit_ts > Packet.xmit_ts AND RACK.xmit_ts > Packet.xmit_ts
AND
(RACK.xmit_ts - Packet.xmit_ts) + (now - RACK.ack_ts) > RACK.reo_wnd (RACK.xmit_ts - Packet.xmit_ts) + (now - RACK.ack_ts) > RACK.reo_wnd
If we solve this second condition for "now", the moment at which we If we solve this second condition for "now", the moment at which we
can declare a packet lost, then we get: can declare a packet lost, then we get:
now > Packet.xmit_ts + RACK.reo_wnd + (RACK.ack_ts - RACK.xmit_ts) now > Packet.xmit_ts + RACK.reo_wnd + (RACK.ack_ts - RACK.xmit_ts)
Then (RACK.ack_ts - RACK.xmit_ts) is just the RTT of the packet we Then (RACK.ack_ts - RACK.xmit_ts) is just the RTT of the packet we
used to set RACK.xmit_ts, so this reduces to: used to set RACK.xmit_ts, so this reduces to:
skipping to change at page 7, line 31 skipping to change at page 8, line 5
The following pseudocode implements the algorithm above. When an ACK The following pseudocode implements the algorithm above. When an ACK
is received or the RACK timer expires, call RACK_detect_loss(). The is received or the RACK timer expires, call RACK_detect_loss(). The
algorithm includes an additional optimization to break timestamp ties algorithm includes an additional optimization to break timestamp ties
by using the TCP sequence space. The optimization is particularly by using the TCP sequence space. The optimization is particularly
useful to detect losses in a timely manner with TCP Segmentation useful to detect losses in a timely manner with TCP Segmentation
Offload, where multiple packets in one TSO blob have identical Offload, where multiple packets in one TSO blob have identical
timestamps. It is also useful when the timestamp clock granularity timestamps. It is also useful when the timestamp clock granularity
is close to or longer than the actual round trip time. is close to or longer than the actual round trip time.
RACK_detect_loss(): RACK_detect_loss():
min_timeout = 0 min_timeout = 0
For each packet, Packet, in the scoreboard: For each packet, Packet, in the scoreboard:
If Packet is already SACKed, ACKed, If Packet is already SACKed, ACKed,
or marked lost and not yet retransmitted: or marked lost and not yet retransmitted:
Skip to the next packet Skip to the next packet
If Packet.xmit_ts > RACK.xmit_ts: If Packet.xmit_ts > RACK.xmit_ts:
Skip to the next packet Skip to the next packet
If Packet.xmit_ts == RACK.xmit_ts AND // Timestamp tie breaker /* Timestamp tie breaker */
Packet.end_seq > RACK.end_seq If Packet.xmit_ts == RACK.xmit_ts AND
Skip to the next packet Packet.end_seq > RACK.end_seq:
Skip to the next packet
timeout = Packet.xmit_ts + RACK.RTT + RACK.reo_wnd + 1 timeout = Packet.xmit_ts + RACK.RTT + RACK.reo_wnd + 1
If Now() >= timeout If Now() >= timeout:
Mark Packet lost Mark Packet lost
Else If (min_timeout == 0) or (timeout is before min_timeout): Else If (min_timeout == 0) or (timeout is before min_timeout):
min_timeout = timeout min_timeout = timeout
If min_timeout != 0 If min_timeout != 0
Arm a timer to call RACK_detect_loss() after min_timeout Arm a timer to call RACK_detect_loss() after min_timeout
6. Analysis and Discussion 6. Tail Loss Probe: fast recovery on tail losses
6.1. Advantages This section describes a supplemental algorithm, Tail Loss Probe
(TLP), which leverages RACK to further reduce RTO recoveries. TLP
triggers fast recovery to quickly repair tail losses that can
otherwise only be recoverable by RTOs. After an original data
transmission, TLP sends a probe data segment within one to two RTTs.
The probe data segment can either be new, previously unsent data, or
a retransmission. In either case the goal is to elicit more feedback
from the receiver, in the form of an ACK (potentially with SACK
blocks), to allow RACK to trigger fast recovery instead of an RTO.
An RTO occurs when the first unacknowledged sequence number is not
acknowledged after a conservative period of time has elapsed [RFC6298
[1]]. Common causes of RTOs include:
1. Tail losses at the end of an application transaction.
2. Lost retransmits, which can halt fast recovery if the ACK stream
completely dries up. For example, consider a window of three
data packets (P1, P2, P3) that are sent; P1 and P2 are dropped.
On receipt of a SACK for P3, RACK marks P1 and P2 as lost and
retransmits them as R1 and R2. Suppose R1 and R2 are lost as
well, so there are no more returning ACKs to detect R1 and R2 as
lost. Recovery stalls.
3. Tail losses of ACKs.
4. An unexpectedly long round-trip time (RTT). This can cause ACKs
to arrive after the RTO timer expires. The F-RTO algorithm
[RFC5682 [2]] is designed to detect such spurious retransmission
timeouts and at least partially undo the consequences of such
events (though F-RTO cannot be used in many situations).
6.1. Tail Loss Probe: An Example
Following is an example of TLP. All events listed are at a TCP
sender.
(1) Sender transmits segments 1-10: 1, 2, 3, ..., 8, 9, 10. There is
no more new data to transmit. A PTO is scheduled to fire in 2 RTTs,
after the transmission of the 10th segment. (2) Sender receives
acknowledgements (ACKs) for segments 1-5; segments 6-10 are lost and
no ACKs are received. The sender reschedules its PTO timer relative
to the last received ACK, which is the ACK for segment 5 in this
case. The sender sets the PTO interval using the calculation
described in step (2) of the algorithm. (3) When PTO fires, sender
retransmits segment 10. (4) After an RTT, a SACK for packet 10
arrives. The ACK also carries SACK holes for segments 6, 7, 8 and 9.
This triggers RACK-based loss recovery. (5) The connection enters
fast recovery and retransmits the remaining lost segments.
6.2. Tail Loss Probe Algorithm Details
We define the terminology used in specifying the TLP algorithm:
FlightSize: amount of outstanding data in the network, as defined in
[RFC5681 [3]].
RTO: The transport's retransmission timeout (RTO) is based on
measured round-trip times (RTT) between the sender and receiver, as
specified in [RFC6298 [4]] for TCP. PTO: Probe timeout is a timer
event indicating that an ACK is overdue. Its value is constrained to
be smaller than or equal to an RTO.
SRTT: smoothed round-trip time, computed as specified in [RFC6298
[5]].
Open state: the sender has so far received in-sequence ACKs with no
SACK blocks, and no other indications (such as retransmission
timeout) that a loss may have occurred.
The TLP algorithm has three phases, which we discuss in turn.
6.2.1. Phase 1: Scheduling a loss probe
Step 1: Check conditions for scheduling a PTO.
A sender should schedule a PTO after transmitting new data or
receiving an ACK if the following conditions are met:
(a) The connection is in Open state. (b) The connection is either
cwnd-limited (the data in flight matches or exceeds the cwnd) or
application-limited (there is no unsent data that the receiver window
allows to be sent). (c) SACK is enabled for the connection.
(d) The most recently transmitted data was not itself a TLP probe
(i.e. a sender MUST NOT send consecutive or back-to-back TLP probes).
(e) TLPRtxOut is false, indicating there is no TLP retransmission
episode in progress (see below).
Step 2: Select the duration of the PTO.
A sender SHOULD use the following logic to select the duration of a
PTO:
If an SRTT estimate is available:
PTO = 2 * SRTT
Else:
PTO = initial RTO of 1 sec
If FlightSize == 1:
PTO = max(PTO, 1.5 * SRTT + WCDelAckT)
PTO = max(10ms, PTO)
PTO = min(RTO, PTO)
Aiming for a PTO value of 2*SRTT allows a sender to wait long enough
to know that an ACK is overdue. Under normal circumstances, i.e. no
losses, an ACK typically arrives in one SRTT. But choosing PTO to be
exactly an SRTT is likely to generate spurious probes given that
network delay variance and even end-system timings can easily push an
ACK to be above an SRTT. We chose PTO to be the next integral
multiple of SRTT. Similarly, current end-system processing latencies
and timer granularities can easily push an ACK beyond 10ms, so
senders SHOULD use a minimum PTO value of 10ms. If RTO is smaller
than the computed value for PTO, then a probe is scheduled to be sent
at the RTO time.
WCDelAckT stands for worst case delayed ACK timer. When FlightSize
is 1, PTO is inflated additionally by WCDelAckT time to compensate
for a potential long delayed ACK timer at the receiver. The
RECOMMENDED value for WCDelAckT is 200ms, or the delayed ACK interval
value explicitly negotiated by the sender and receiver, if one is
available.
6.2.2. Phase 2: Sending a loss probe
When the PTO fires, transmit a probe data segment:
If a previously unsent segment exists AND
the receive window allows new data to be sent:
Transmit that new segment
FlightSize += SMSS
The cwnd remains unchanged
Record Packet.xmit_ts
Else:
Retransmit the last segment
The cwnd remains unchanged
6.2.3. Phase 3: ACK processing
On each incoming ACK, the sender should ancel any existing loss probe
timer. The timer will be re-scheduled if appropriate.
6.3. TLP recovery detection
If the only loss in an outstanding window of data was the last
segment, then a TLP loss probe retransmission of that data segment
might repair the loss. TLP loss detection examines ACKs to detect
when the probe might have repaired a loss, and thus allows congestion
control to properly reduce the congestion window (cwnd) [RFC5681
[6]].
Consider a TLP retransmission episode where a sender retransmits a
tail packet in a flight. The TLP retransmission episode ends when
the sender receives an ACK with a SEG.ACK above the SND.NXT at the
time the episode started. During the TLP retransmission episode the
sender checks for a duplicate ACK or D-SACK indicating that both the
original segment and TLP retransmission arrived at the receiver,
meaning there was no loss that needed repairing. If the TLP sender
does not receive such an indication before the end of the TLP
retransmission episode, then it MUST estimate that either the
original data segment or the TLP retransmission were lost, and
congestion control MUST react appropriately to that loss as it would
any other loss.
Since a significant fraction of the hosts that support SACK do not
support duplicate selective acknowledgments (D-SACKs) [RFC2883 [7]]
the TLP algorithm for detecting such lost segments relies only on
basicRFC 2018 [8] SACK support [RFC2018 [9]].
Definitions of variables
TLPRtxOut: a boolean indicating whether there is an unacknowledged
TLP retransmission.
TLPHighRxt: the value of SND.NXT at the time of sending a TLP
retransmission.
6.3.1. Initializing and resetting state
When a connection is created, or suffers a retransmission timeout, or
enters fast recovery, it should reset TLPRtxOut to false
6.3.2. Recording loss probe states
Senders must only send a TLP loss probe retransmission if TLPRtxOut
is false. This ensures that at any given time a connection has at
most one outstanding TLP retransmission. This allows the sender to
use the algorithm described in this section to estimate whether any
data segments were lost.
Note that this condition only restricts TLP loss probes that are
retransmissions. There may be an arbitrary number of outstanding
unacknowledged TLP loss probes that consist of new, previously-unsent
data, since the retransmission timeout and fast recovery algorithms
are sufficient to detect losses of such probe segments.
Upon sending a TLP probe that is a retransmission, the sender set
TLPRtxOut to true and TLPHighRxt to SND.NXT
Detecting recoveries done by loss probes
Step 1: Track ACKs indicating receipt of original and retransmitted
segments
A sender considers both the original segment and TLP probe
retransmission segment as acknowledged if either (i) or (ii) are
true:
(i) This is a duplicate acknowledgment (as defined in [RFC5681 [10]],
section 2), and all of the following conditions are met:
(a) TLPRtxOut is true
(b) SEG.ACK == TLPHighRxt
(c) SEG.ACK == SND.UNA
(d) the segment contains no SACK blocks for sequence ranges above
TLPHighRxt
(e) the segment contains no data
(f) the segment is not a window update
(ii) This is an ACK acknowledging a sequence number at or above
TLPHighRxt and it contains a D-SACK; i.e. all of the following
conditions are met:
(a) TLPRtxOut is true
(b) SEG.ACK >= TLPHighRxt and
(c) the ACK contains a D-SACK block
If either conditions (i) or (ii) are met, then the sender estimates
that the receiver received both the original data segment and the TLP
probe retransmission, and so the sender considers the TLP episode to
be done, and records that fact by setting TLPRtxOut to false.
Step 2: Mark the end of a TLP retransmission episode and detect
losses
If the sender receives a cumulative ACK for data beyond the TLP loss
probe retransmission then, in the absence of reordering on the return
path of ACKs, it should have received any ACKs for the original
segment and TLP probe retransmission segment. At that time, if the
TLPRtxOut flag is still true and thus indicates that the TLP probe
retransmission remains unacknowledged, then the sender should presume
that at least one of its data segments was lost, so it SHOULD invoke
a congestion control response equivalent to the response to any other
loss.
More precisely, on each ACK, after executing step (5a) the sender
SHOULD reset the TLPRtxOut to false, and invoke the congestion
control about the loss event that TLP has successfully repaired.
7. RACK and TLP discussions
7.1. Advantages
The biggest advantage of RACK is that every data packet, whether it The biggest advantage of RACK is that every data packet, whether it
is an original data transmission or a retransmission, can be used to is an original data transmission or a retransmission, can be used to
detect losses of the packets sent prior to it. detect losses of the packets sent prior to it.
Example: tail drop. Consider a sender that transmits a window of Example: tail drop. Consider a sender that transmits a window of
three data packets (P1, P2, P3), and P1 and P3 are lost. Suppose the three data packets (P1, P2, P3), and P1 and P3 are lost. Suppose the
transmission of each packet is at least RACK.reo_wnd (1 millisecond transmission of each packet is at least RACK.reo_wnd (1 millisecond
by default) after the transmission of the previous packet. RACK will by default) after the transmission of the previous packet. RACK will
mark P1 as lost when the SACK of P2 is received, and this will mark P1 as lost when the SACK of P2 is received, and this will
skipping to change at page 9, line 22 skipping to change at page 15, line 14
For some implementations (e.g., Linux), RACK works quite efficiently For some implementations (e.g., Linux), RACK works quite efficiently
with TCP Segmentation Offload (TSO). RACK always marks the entire with TCP Segmentation Offload (TSO). RACK always marks the entire
TSO blob lost because the packets in the same TSO blob have the same TSO blob lost because the packets in the same TSO blob have the same
transmission timestamp. By contrast, the counting based algorithms transmission timestamp. By contrast, the counting based algorithms
(e.g., [RFC3517][RFC5681]) may mark only a subset of packets in the (e.g., [RFC3517][RFC5681]) may mark only a subset of packets in the
TSO blob lost, forcing the stack to perform expensive fragmentation TSO blob lost, forcing the stack to perform expensive fragmentation
of the TSO blob, or to selectively tag individual packets lost in the of the TSO blob, or to selectively tag individual packets lost in the
scoreboard. scoreboard.
6.2. Disadvantages 7.2. Disadvantages
RACK requires the sender to record the transmission time of each RACK requires the sender to record the transmission time of each
packet sent at a clock granularity of one millisecond or finer. TCP packet sent at a clock granularity of one millisecond or finer. TCP
implementations that record this already for RTT estimation do not implementations that record this already for RTT estimation do not
require any new per-packet state. But implementations that are not require any new per-packet state. But implementations that are not
yet recording packet transmission times will need to add per-packet yet recording packet transmission times will need to add per-packet
internal state (commonly either 4 or 8 octets per packet) to track internal state (commonly either 4 or 8 octets per packet) to track
transmission times. In contrast, the conventional approach requires transmission times. In contrast, the conventional approach requires
one variable to track number of duplicate ACK threshold. one variable to track number of duplicate ACK threshold.
6.3. Adjusting the reordering window 7.3. Adjusting the reordering window
RACK uses a reordering window of min_rtt / 4. It uses the minimum RACK uses a reordering window of min_rtt / 4. It uses the minimum
RTT to accommodate reordering introduced by packets traversing RTT to accommodate reordering introduced by packets traversing
slightly different paths (e.g., router-based parallelism schemes) or slightly different paths (e.g., router-based parallelism schemes) or
out-of-order deliveries in the lower link layer (e.g., wireless links out-of-order deliveries in the lower link layer (e.g., wireless links
using link-layer retransmission). Alternatively, RACK can use the using link-layer retransmission). Alternatively, RACK can use the
smoothed RTT used in RTT estimation [RFC6298]. However, smoothed RTT smoothed RTT used in RTT estimation [RFC6298]. However, smoothed RTT
can be significantly inflated by orders of magnitude due to can be significantly inflated by orders of magnitude due to
congestion and buffer-bloat, which would result in an overly congestion and buffer-bloat, which would result in an overly
conservative reordering window and slow loss detection. Furthermore, conservative reordering window and slow loss detection. Furthermore,
skipping to change at page 10, line 10 skipping to change at page 16, line 5
One potential improvement is to further adapt the reordering window One potential improvement is to further adapt the reordering window
by measuring the degree of reordering in time, instead of packet by measuring the degree of reordering in time, instead of packet
distances. But that requires storing the delivery timestamp of each distances. But that requires storing the delivery timestamp of each
packet. Some scoreboard implementations currently merge SACKed packet. Some scoreboard implementations currently merge SACKed
packets together to support TSO (TCP Segmentation Offload) for faster packets together to support TSO (TCP Segmentation Offload) for faster
scoreboard indexing. Supporting per-packet delivery timestamps is scoreboard indexing. Supporting per-packet delivery timestamps is
difficult in such implementations. However, we acknowledge that the difficult in such implementations. However, we acknowledge that the
current metric can be improved by further research. current metric can be improved by further research.
6.4. Relationships with other loss recovery algorithms 7.4. Relationships with other loss recovery algorithms
The primary motivation of RACK is to ultimately provide a simple and The primary motivation of RACK is to ultimately provide a simple and
general replacement for some of the standard loss recovery algorithms general replacement for some of the standard loss recovery algorithms
[RFC5681][RFC6675][RFC5827][RFC4653] and nonstandard ones [RFC5681][RFC6675][RFC5827][RFC4653] and nonstandard ones
[FACK][THIN-STREAM]. While RACK can be a supplemental loss detection [FACK][THIN-STREAM]. While RACK can be a supplemental loss detection
on top of these algorithms, this is not necessary, because the RACK on top of these algorithms, this is not necessary, because the RACK
implicitly subsumes most of them. implicitly subsumes most of them.
[RFC5827][RFC4653][THIN-STREAM] dynamically adjusts the duplicate ACK [RFC5827][RFC4653][THIN-STREAM] dynamically adjusts the duplicate ACK
threshold based on the current or previous flight sizes. RACK takes threshold based on the current or previous flight sizes. RACK takes
skipping to change at page 11, line 5 skipping to change at page 16, line 46
Furthermore, RACK naturally works well with Tail Loss Probe [TLP] Furthermore, RACK naturally works well with Tail Loss Probe [TLP]
because a tail loss probe solicit seither an ACK or SACK, which can because a tail loss probe solicit seither an ACK or SACK, which can
be used by RACK to detect more losses. RACK can be used to relax be used by RACK to detect more losses. RACK can be used to relax
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 can be numbers, and uses transmission time instead. Thus TLP can be
modified to retransmit the first unacknowledged packet, which can modified to retransmit the first unacknowledged packet, which can
improve application latency. improve application latency.
6.5. Interaction with congestion control 7.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]. However, RACK may detect losses
earlier or later than the conventional duplicate ACK threshold earlier or later than the conventional duplicate ACK threshold
approach does. A packet marked lost by RACK SHOULD NOT be approach does. A packet marked lost by RACK SHOULD NOT be
retransmitted until congestion control deems this appropriate (e.g. retransmitted until congestion control deems this appropriate (e.g.
using [RFC6937]). using [RFC6937]).
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]. The distinction between retransmission timeout (RTO) in [RFC5681]. The distinction between
fast recovery or RTO recovery is not necessary because RACK is purely fast recovery or RTO recovery is not necessary because RACK is purely
based on the transmission time order of packets. When a packet based on the transmission time order of packets. When a packet
retransmitted by RTO is acknowledged, RACK will mark any unacked retransmitted by RTO is acknowledged, RACK will mark any unacked
packet sent sufficiently prior to the RTO as lost, because at least packet sent sufficiently prior to the RTO as lost, because at least
one RTT has elapsed since these packets were sent. one RTT has elapsed since these packets were sent.
6.6. RACK for other transport protocols 7.6. TLP recovery detection with delayed ACKs
Delayed ACKs complicate the detection of reparies done by TLP, since
with a delayed ACK the sender receives one fewer ACK than would
normally be expected. To mitigate this complication, before sending
a TLP loss probe retransmission, the sender should attempt to wait
long enough that the receiver has sent any delayed ACKs that it is
withholding. The sender algorithm described above features such a
delay, in the form of WCDelAckT. Furthermore, if the receiver
supports duplicate selective acknowledgments (D-SACKs) [RFC2883] then
in the case of a delayed ACK the sender's TLP loss detection
algorithm (in step (4)(a)(ii), above) can use the D-SACK information
to infer that the original and TLP retransmission both arrived at the
receiver.
If there is ACK loss or a delayed ACK without a D-SACK, then this
algorithm is conservative, because the sender will reduce cwnd when
in fact there was no packet loss. In practice this is acceptable,
and potentially even desirable: if there is reverse path congestion
then reducing cwnd is prudent.
However, in practice sending a single byte of data turned out to be
problematic to implement and more fragile than necessary. Instead we
use a full segment to probe but have to add complexity to compensate
for the probe itself masking losses.
7.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 skip step 3 and simplify if the protocol can support unique can skip step 3 and simplify if the protocol can support unique
transmission or packet identifier (e.g. TCP echo options). For transmission or packet identifier (e.g. TCP echo options). For
example, the QUIC protocol implements RACK [QUIC-LR] . example, the QUIC protocol implements RACK [QUIC-LR] .
7. Security Considerations 8. Experiments and Performance Evaluations
RACK and TLP have been deployed at Google including the connections
to the users in the Internet and internally. We conducted an
performance evaluation experiment on RACK and TLP on a small set of
Google Web servers in western-europe that serve most European and
some African countries. The length of the experiments was five days
(one weekend plus 3 weekdays) in October 2016, where the servers were
divided evenly into three groups.
Group 1 (control): RACK off, TLP off
Group 2: RACK on, TLP off
Group 3: RACK on, TLP on
All groups use Linux using the Cubic congestion control with an
initial window of 10 packets and fq/pacing qdisc. In term of
specific recovery features, all of them enable RFC3517 (Conservative
SACK-based recovery) and RFC5682 (F-RTO) but disable FACK because it
is not an IETF RFC. The goal of this setup is to compare RACK and
TLP to RFC-based loss recoveries instead of Linux-based recoveries.
The servers sit behind a load-balancer that distributes the
connections evenly across the three groups.
Each group handles similar amount of connections and send and receive
similar amount of data. We compare total amount of time spent in
loss recovery across groups. The recovery time is from when the
recovery and retransmit starts, till the remote has acknowledge
beyond the highest sequence at the time the recovery starts.
Therefore the recovery includes both fast recoveries and timeout
recoveries. Our data shows that Group 2 recovery latency is only 2%
lower than the Group 1 recovery latency. But Group 3 recovery
latency is 25% lower than Group 1 by reducing 40% of the RTOs
triggered recoveries! Therefore it is very important to implement
both TLP and RACK for performance.
We want to emphasize that the current experiment is limited in terms
of network coverage. The connectivities in western-europe is fairly
good therefore loss recovery is not a performance bottleneck. We
plan to expand our experiments in regions with worse connectivities,
in particular on networks with strong traffic policing. We also plan
to add the fourth group to disable RFC3517 to use solely RACK and TLP
only to see if RACK plus TLP can completely replace all other SACK
based recoveries.
9. Security Considerations
RACK does not change the risk profile for TCP. RACK does not change the risk profile for TCP.
An interesting scenario is ACK-splitting attacks [SCWA99]: for an An interesting scenario is ACK-splitting attacks [SCWA99]: for an
MSS-size packet sent, the receiver or the attacker might send MSS MSS-size packet sent, the receiver or the attacker might send MSS
ACKs that SACK or acknowledge one additional byte per ACK. This ACKs that SACK or acknowledge one additional byte per ACK. This
would not fool RACK. RACK.xmit_ts would not advance because all the would not fool RACK. RACK.xmit_ts would not advance because all the
sequences of the packet are transmitted at the same time (carry the sequences of the packet are transmitted at the same time (carry the
same transmission timestamp). In other words, SACKing only one byte same transmission timestamp). In other words, SACKing only one byte
of a packet or SACKing the packet in entirety have the same effect on of a packet or SACKing the packet in entirety have the same effect on
RACK. RACK.
8. IANA Considerations 10. IANA Considerations
This document makes no request of IANA. This document makes no request of IANA.
Note to RFC Editor: this section may be removed on publication as an Note to RFC Editor: this section may be removed on publication as an
RFC. RFC.
9. Acknowledgments 11. Acknowledgments
The authors thank Matt Mathis for his insights in FACK and Michael The authors thank Matt Mathis for his insights in FACK and Michael
Welzl for his per-packet timer idea that inspired this work. Nandita Welzl for his per-packet timer idea that inspired this work. Eric
Dukkipati, Eric Dumazet, Randy Stewart, Van Jacobson, Ian Swett, and Dumazet, Randy Stewart, Van Jacobson, Ian Swett, and Jana Iyengar
Jana Iyengar contributed to the algorithm and the implementations in contributed to the algorithm and the implementations in Linux,
Linux, FreeBSD and QUIC. FreeBSD and QUIC.
10. References 12. References
10.1. Normative References 12.1. Normative References
[RFC793] Postel, J., "Transmission Control Protocol", September [RFC793] Postel, J., "Transmission Control Protocol", September
1981. 1981.
[RFC2018] Mathis, M. and J. Mahdavi, "TCP Selective Acknowledgment [RFC2018] Mathis, M. and J. Mahdavi, "TCP Selective Acknowledgment
Options", RFC 2018, October 1996. Options", RFC 2018, October 1996.
[RFC6937] Mathis, M., Dukkipati, N., and Y. Cheng, "Proportional [RFC6937] Mathis, M., Dukkipati, N., and Y. Cheng, "Proportional
Rate Reduction for TCP", May 2013. Rate Reduction for TCP", May 2013.
skipping to change at page 13, line 13 skipping to change at page 20, line 37
Control", RFC 5681, September 2009. Control", RFC 5681, September 2009.
[RFC2883] Floyd, S., Mahdavi, J., Mathis, M., and M. Podolsky, "An [RFC2883] Floyd, S., Mahdavi, J., Mathis, M., and M. Podolsky, "An
Extension to the Selective Acknowledgement (SACK) Option Extension to the Selective Acknowledgement (SACK) Option
for TCP", RFC 2883, July 2000. for TCP", RFC 2883, July 2000.
[RFC7323] Borman, D., Braden, B., Jacobson, V., and R. [RFC7323] Borman, D., Braden, B., Jacobson, V., and R.
Scheffenegger, "TCP Extensions for High Performance", Scheffenegger, "TCP Extensions for High Performance",
September 2014. September 2014.
10.2. Informative References 12.2. Informative References
[FACK] Mathis, M. and M. Jamshid, "Forward acknowledgement: [FACK] Mathis, M. and M. Jamshid, "Forward acknowledgement:
refining TCP congestion control", ACM SIGCOMM Computer refining TCP congestion control", ACM SIGCOMM Computer
Communication Review, Volume 26, Issue 4, Oct. 1996. , Communication Review, Volume 26, Issue 4, Oct. 1996. ,
1996. 1996.
[TLP] Dukkipati, N., Cardwell, N., Cheng, Y., and M. Mathis, [TLP] Dukkipati, N., Cardwell, N., Cheng, Y., and M. Mathis,
"Tail Loss Probe (TLP): An Algorithm for Fast Recovery of "Tail Loss Probe (TLP): An Algorithm for Fast Recovery of
Tail Drops", draft-dukkipati-tcpm-tcp-loss-probe-01 (work Tail Drops", draft-dukkipati-tcpm-tcp-loss-probe-01 (work
in progress), August 2013. in progress), August 2013.
skipping to change at page 14, line 5 skipping to change at page 21, line 30
[SCWA99] Savage, S., Cardwell, N., Wetherall, D., and T. Anderson, [SCWA99] Savage, S., Cardwell, N., Wetherall, D., and T. Anderson,
"TCP Congestion Control With a Misbehaving Receiver", ACM "TCP Congestion Control With a Misbehaving Receiver", ACM
Computer Communication Review, 29(5) , 1999. Computer Communication Review, 29(5) , 1999.
[POLICER16] [POLICER16]
Flach, T., Papageorge, P., Terzis, A., Pedrosa, L., Cheng, Flach, T., Papageorge, P., Terzis, A., Pedrosa, L., Cheng,
Y., Karim, T., Katz-Bassett, E., and R. Govindan, "An Y., Karim, T., Katz-Bassett, E., and R. Govindan, "An
Analysis of Traffic Policing in the Web", ACM SIGCOMM , Analysis of Traffic Policing in the Web", ACM SIGCOMM ,
2016. 2016.
12.3. URIs
[1] https://tools.ietf.org/html/rfc6298
[2] https://tools.ietf.org/html/rfc5682
[3] https://tools.ietf.org/html/rfc5681
[4] https://tools.ietf.org/html/rfc6298
[5] https://tools.ietf.org/html/rfc6298
[6] https://tools.ietf.org/html/rfc5681
[7] https://tools.ietf.org/html/rfc2883
[8] https://tools.ietf.org/html/rfc2018
[9] https://tools.ietf.org/html/rfc2018
[10] https://tools.ietf.org/html/rfc5681
Authors' Addresses Authors' Addresses
Yuchung Cheng Yuchung Cheng
Google, Inc Google, Inc
1600 Amphitheater Parkway 1600 Amphitheater Parkway
Mountain View, California 94043 Mountain View, California 94043
USA USA
Email: ycheng@google.com Email: ycheng@google.com
Neal Cardwell Neal Cardwell
Google, Inc Google, Inc
76 Ninth Avenue 76 Ninth Avenue
New York, NY 10011 New York, NY 10011
USA USA
Email: ncardwell@google.com Email: ncardwell@google.com
Nandita Dukkipati
Google, Inc
1600 Amphitheater Parkway
Mountain View, California 94043
USA
Email: nanditad@google.com
 End of changes. 33 change blocks. 
54 lines changed or deleted 414 lines changed or added

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