The TCP Minimum RTO Revisited Ioannis Psaras and Vassilis Tsaoussidis (ipsaras, vtsaousi)@ee.duth.gr COMputer NETworks (COMNET) Group Democritus University of Thrace, Xanthi, Greece http://comnet.ee.duth.gr/ The TCP Minimum RTO Revisited s.1/22
Introductory Notes According to RFC 2988 (Computing TCP s Retransmission Timer): 1. RTO = SRTT + 4 RTTV AR, 2. RTO 1 second (i.e., Minimum RTO) The Minimum RTO protects TCP against spurious timeouts caused by: 1. coarse-grained clocks (500ms for most OSs at that time, i.e., Nov. 2000) 2. the Delayed Acknowledgments (usually set to 200 ms), RFC1122 The TCP Minimum RTO Revisited s.2/22
Our Contribution We re-examine the two reasons for the conservative 1-second Minimum TCP-RTO: 1. the OS clock granularity, and 2. the Delayed ACKs. We find that reason 1 is canceled in modern OSs, We carefully design a mechanism to deal with reason 2. We show (through simulations) that in next generation s high-speed, wireless-access networks, TCP-RTO should not be limited by a fixed, conservative lower bound. The TCP Minimum RTO Revisited s.3/22
Cost Function We define a Cost Function to capture the impact of the Minimum RTO to TCP s performance: C(f) = RTO min RTO current If C(f) 1, the Minimum RTO adds no extra waiting time. Otherwise, the Minimum RTO will negatively impact TCP Throughput. The TCP Minimum RTO Revisited s.4/22
Clock Granularity (1/5): Motivation We simulate a coarse-grained flow (i.e., G=500ms) over a 500ms Round-Trip Propagation Delay (RTPD) path, to observe: 1. the rationale behind the conservative 1-second Minimum RTO setting, and 2. the impact of the Minimum RTO value relatively with the actual TCP-RTO value. The TCP Minimum RTO Revisited s.5/22
Clock Granularity (2/5): Observations We observe that: 1. C(f) < 1 (no negative impact on TCP Throughput), 2. the Minimum RTO is only needed as a safety margin. 24 440 22 Sequence Number 20 18 16 14 12 Sequence Number 435 430 425 10 9.5 10 10.5 11 11.5 12 12.5 13 13.5 14 DATA pkt ACK Time (s) RTO min RTO 420 15 15.5 16 16.5 17 17.5 DATA pkt ACK Time (s) RTO min RTO (a) G = 500ms, RTPD = 500ms (b) G = 500ms, RTPD = 6ms The TCP Minimum RTO Revisited s.6/22
Clock Granularity (3/5): OS Details Table 1: Details on Modern OSs OS Clock Granularity Delayed ACK Windows 15-16ms 200ms Solaris 10ms 50-100ms Linux 25ms Dynamically Set We repeat the above experiment using, this time, a finer-grained clock of 10ms. The TCP Minimum RTO Revisited s.7/22
Clock Granularity (4/5): Impact C(f) RTO min T(ACK Arr) RTO min RCG+RTPD+QD 62.5 1480 Sequence Number 1475 1470 1465 1460 1455 1450 7.2 7.4 7.6 7.8 8 8.2 8.4 8.6 DATA pkt ACK Time (s) RTO min RTO Figure 2: G = 10ms, RTPD = 6ms The TCP Minimum RTO Revisited s.8/22
Clock Granularity (5/5): Conclusions We conclude that: 1. the clock granularity should not be a matter of concern for the setting of the Minimum RTO, and 2. the conservative 1-second Minimum RTO will have major impact on TCP s performance, in case of packet losses. The TCP Minimum RTO Revisited s.9/22
Delayed ACKs (1/6): Notes TCP sends D back-to-back packets, according to RFC 2581: D = snd.una + min(cwnd, rwnd) - snd.nxt. TCP does not know the application s sending pattern. Only the ACK of the last packet of the "train" of back-to-back packets may be delayed. Every 2 nd packet will always be ACKed. The TCP Minimum RTO Revisited s.10/22
Delayed ACKs (2/6): An Example At time t 0 all previously transmitted packets are already ACKed. D = 4: (or generally D: even) The client will ACK the 2 nd and 4 th packets. No Delayed ACKs no need for extended Minimum RTO. D = 3: (or generally D: odd) Client will ACK the 2 nd packet and will trigger the DelACK timer for the 3 rd packet. The 3 rd packet s ACK may be Delayed extend the Minimum RTO, for the 3 rd packet only. The TCP Minimum RTO Revisited s.11/22
Delayed ACKs (3/6): Algorithm States The proposed mechanism operates in one of the following States: State 1: "nominrto". Do not apply extended Minimum RTO to any outgoing packet (i.e., the receiver will always ACK the last packet of the back-to-back train of packets); set set_odd to false. State 2: "extended MINRTO". Apply extended Minimum RTO to the last packet of the next train of back-to-back packets; set set_odd to true. The TCP Minimum RTO Revisited s.12/22
Delayed ACKs (4/6): State Diagram 1st packet of the Slow-Start phase extend MINRTO set_odd:false D:even D:even D:odd D:even nominrto set_odd:false D:odd D:odd extend MINRTO for last pkt of train set_odd:true Figure 3: State Diagram The TCP Minimum RTO Revisited s.13/22
Delayed ACKs (5/6): Example Sequence Number 1490 1488 1486 1484 1482 1480 1478 1476 2 pkts b2b 2 pkts b2b 2 pkts b2b 3 pkts b2b 2 pkts b2b 2 pkts b2b 7 7.2 7.4 7.6 7.8 8 Time (s) The ACK of the last b2b pkt may be delayed. Extend the Minimum RTO DATA pkt ACK RTO min RTO Figure 4: Modeling ACKs Arrival The TCP Minimum RTO Revisited s.14/22
Delayed ACKs (6/6): Impact RTO min = { R ms, for the last pkt if set_odd = 1, RTO cur, otherwise, where R is a fixed, extended value for the Minimum RTO. C(f) = { R ms RTO cur, for the last pkt if set_odd = 1, 1, otherwise. The TCP Minimum RTO Revisited s.15/22
Performance Evaluation (1/2) TCP version: Reno SACK: enabled Timestamps: enabled Spurious response: enabled Delayed ACK Timer: 200ms Granularity: 10ms Buffers use RED, Buffer size = BDP We measure the System Goodput: Goodput = Original_Data Connection_time The TCP Minimum RTO Revisited s.16/22
Performance Evaluation (2/2) We compare the proposed algorithm with three different TCP implementations: 1. Linux TCP: Minimum RTO = 200ms 2. Solaris TCP: Minimum RTO = 400ms 3. IETF Proposal (RFC 2988): Minimum RTO = 1s (probably Windows TCP) The TCP Minimum RTO Revisited s.17/22
Results (1/4): The Need for a Standard Mechanism (1/2) If Srv s Min RTO < RTPD + QD + Clnt s DelACK Timer and Minimum RTO > RTO cur, then the TCP server will spuriously timeout every time an ACK is delayed and D = 1. The TCP Minimum RTO Revisited s.18/22
Results (2/4): The Need for a Standard Mechanism (2/2) 608 608 Sequence Number 606 604 602 600 598 596 Spurious Retransmission Sequence Number 606 604 602 600 598 596 Extended Minimum RTO to avoid spurious Timeout 36 36.1 36.2 36.3 36.4 36.5 36.6 36.7 36.8 36 36.1 36.2 36.3 36.4 36.5 36.6 36.7 36.8 Time (s) Time (s) DATA pkt ACK RTO min RTO DATA pkt ACK RTO min RTO (a) Linux Server - 200ms Delayed ACK Client (e.g., Windows client) (b) Modified Linux Server - 200ms Delayed ACK Client (e.g., Windows client) Figure 5: The Need for a Standard Mechanism The TCP Minimum RTO Revisited s.19/22
Results (3/4): Long FTP Flows (1/2) Figure 6: Simulation Topology Table 2: Experiment Details PER TCP Flows bw_bb Fig. 7(a) see Fig. 3 6 Mbps Fig. 7(b) 3% see Fig. 100 Mbps Fig. 7(c) 3% 500 see Fig. The TCP Minimum RTO Revisited s.20/22
Results (4/4): Long FTP Flows (2/2) Goodput (B/s) 400000 350000 300000 250000 200000 150000 100000 50000 0 2 3 4 5 Packet Error Rate (%) Goodput (B/s) 1e+07 8e+06 6e+06 4e+06 2e+06 0 20 40 60 80 100 Number of Participating Flows IETF Solaris Linux nominrto IETF Solaris Linux nominrto (a) Increasing PER (b) Increasing TCP Contention Goodput (B/s) 7e+07 6e+07 5e+07 4e+07 3e+07 2e+07 1e+07 0 2 4 6 8 10 Backbone Bandwidth Capacity (Gbps) IETF Solaris Linux nominrto (c) Increasing Bandwidth Capacity The TCP Minimum RTO Revisited s.21/22
Conclusions 1. The conservative 1-second Minimum RTO setting causes severe TCP performance degradation. 2. The Minimum RTO setting is not needed, since: modern OSs use fine-grained clocks, and the proposed algorithm deals with the Delayed ACK response. 3. The proposed algorithm: may improve TCP performance up to 50%, effectively avoids spurious timeouts, and overcomes communication inconsistencies, caused by the absense of official instructions regarding the Minimum RTO setting. The TCP Minimum RTO Revisited s.22/22