Docstoc

The TCP Minimum RTO Revisited201111061425

Document Sample
The TCP Minimum RTO Revisited201111061425 Powered By Docstoc
					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/23
                               Introductory Notes


According to RFC 2988 (Computing TCP’s
Retransmission Timer):
1. RT O = SRT T + 4 × RT T V AR,
2. RT O ≥ 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/23
                                 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/23
                                            Cost Function


We define a Cost Function to capture the impact of the
Minimum RTO to TCP’s performance:
                               RT Omin
                    C(f ) =   RT Ocurrent

 •   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/23
             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/23
                                  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




                                                                                     Sequence Number
                      20                                                                               435

                      18
                      16                                                                               430

                      14
                                                                                                       425
                      12
                      10
                                                                                                       420
                           9.5   10   10.5   11   11.5 12    12.5   13   13.5   14                           15   15.5       16       16.5      17       17.5
                                                  Time (s)                                                                     Time (s)
                                  DATA pkt                RTO                                                     DATA pkt              RTO
                                     ACK              min RTO                                                        ACK            min RTO


    (a) G = 500ms, RTPD = 500ms                                                                   (b) G = 500ms, RTPD = 6ms
                                                                                                                                     The TCP Minimum RTO Revisited – s.6/23
              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/23
                                     Clock Granularity (4/5): Impact


• C(f ) ≈ RT Omin         RT Omin
                     ≤ RCG+RT P D+QD ≈ 62.5
         T (ACK Arr)


                              1480

            Sequence Number   1475

                              1470

                              1465

                              1460

                              1455

                              1450
                                     7.2   7.4   7.6   7.8    8   8.2   8.4   8.6
                                                       Time (s)
                                           DATA pkt             RTO
                                              ACK           min RTO




         Figure 2: G = 10ms, RTPD = 6ms
                                                                                    The TCP Minimum RTO Revisited – s.8/23
          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/23
                        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 2nd packet will always be ACKed.



                                           The TCP Minimum RTO Revisited – s.10/23
                Delayed ACKs (2/6): An Example


•   At time t0 all previously transmitted packets are
    already ACKed.
•   D = 4: (or generally D: even)
     • The client will ACK the 2nd and 4th packets.
     • No Delayed ACKs ⇒ no need for extended
       Minimum RTO.
•   D = 3: (or generally D: odd)
     • Client will ACK the 2nd packet and will trigger
       the DelACK timer for the 3rd packet.
     • The 3rd packet’s ACK may be Delayed ⇒ extend
       the Minimum RTO, for the 3rd packet only.
                                           The TCP Minimum RTO Revisited – s.11/23
           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/23
         Delayed ACKs (4/6): State Diagram


               1st packet of the Slow-Start phase
                         extend MINRTO
                         set_odd:false


                D:even                       D:odd
                                                                D:even
D:even

                             D:odd              extend MINRTO for
     noMINRTO
                             D:odd               last pkt of train
     set_odd:false
                                                set_odd:true




           Figure 3: State Diagram


                                                                The TCP Minimum RTO Revisited – s.13/23
                              Delayed ACKs (5/6): Example


                  1490
                  1488
                             2 pkts b2b
Sequence Number
                  1486
                             2 pkts b2b
                  1484
                             2 pkts b2b
                  1482
                  1480       3 pkts b2b
                                                 The ACK of the last b2b
                  1478       2 pkts b2b           pkt may be delayed.
                                                 Extend the Minimum RTO
                  1476       2 pkts b2b
                         7    7.2     7.4       7.6       7.8        8
                                            Time (s)
                             DATA pkt                RTO
                                ACK              min RTO



                  Figure 4: Modeling ACKs Arrival
                                                                     The TCP Minimum RTO Revisited – s.14/23
                          Delayed ACKs (6/6): Impact



               R ms,     for the last pkt if set_odd = 1,
  RT Omin =
               RT Ocur , otherwise,

where R is a fixed, extended value for the Minimum
RTO.
               R ms
    C(f ) =   RT Ocur ,   for the last pkt if   set_odd = 1,
              1,          otherwise.




                                                    The TCP Minimum RTO Revisited – s.15/23
                    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:
               Original_Data
    Goodput = Connection_time

                                         The TCP Minimum RTO Revisited – s.16/23
                   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/23
                     Results (1/4): The Need for a
                       Standard Mechanism (1/2)


If
Srv ′ s M in RT O < RT P D + QD + Clnt′ s DelACK T imer
and
M inimum RT O > RT Ocur ,
then the TCP server will spuriously timeout every time
an ACK is delayed and D = 1.




                                          The TCP Minimum RTO Revisited – s.18/23
                                                              Results (2/4): The Need for a
                                                                Standard Mechanism (2/2)


                   608                                                                     608
                   606    Spurious Retransmission                                          606
 Sequence Number




                                                                         Sequence Number
                   604                                                                     604
                   602                                                                     602
                   600                                                                     600
                   598                                                                     598               Extended Minimum RTO
                   596                                                                     596             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                RTO                                             DATA pkt              RTO
                                   ACK              min RTO                                                ACK            min RTO


(a) Linux Server - 200ms Delayed (b) Modified Linux Server - 200ms
ACK Client (e.g., Windows client) Delayed ACK Client (e.g., Win-
                                                                        dows client)


 Figure 5: The Need for a Standard Mechanism
                                                                                                                          The TCP Minimum RTO Revisited – s.19/23
            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/23
                                       Results (4/4): Long FTP Flows (2/2)


                                                                                                                     1e+07
                400000
Goodput (B/s)




                                                                                                     Goodput (B/s)
                350000                                                                                               8e+06
                300000
                250000                                                                                               6e+06
                200000
                                                                                                                     4e+06
                150000
                100000                                                                                               2e+06
                 50000
                     0                                                                                                      0
                                   2        3                    4           5                                                            20           40    60       80      100
                                       Packet Error Rate (%)                                                                               Number of Participating Flows
                IETF     Solaris   Linux   noMINRTO                                                                  IETF       Solaris        Linux    noMINRTO


                         (a) Increasing PER                                                             (b) Increasing TCP Contention

                                                                7e+07
                                                Goodput (B/s)




                                                                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/23
                                       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/23
           Thank you!
           Questions?
         Ioannis Psaras
http://utopia.duth.gr/~ipsaras




                         The TCP Minimum RTO Revisited – s.23/23