Docstoc

tcp

Document Sample
tcp Powered By Docstoc
					Performance models of TCP

 can simulate (ns-2)
   + faithful to operation of TCP
   - expensive, time consuming
 deterministic approximations
   + quick
   - ignore some TCP details, steady state
 fluid models
   + transient behavior
   - ignore some TCP details
TCP behavior
                                        TCP runs at end-hosts
 congestion control:
    decrease sending rate
     when loss detected,
     increase when no loss
 routers
    discard, mark packets
     when congestion occurs
 interaction between end
  systems (TCP) and
  routers?
      want to understand            congested router drops packets
       (quantify) this interaction
Generic TCP behavior
 window algorithm (window    W)
   up to W packets in network
   return of ACK allows sender to send another
    packet
   cumulative ACKS

 increase window by one per RTT
      W <- W +1/W per ACK
         W <- W +1 per RTT
 seeks available network bandwidth
receiver




           W
sender
Generic TCP behavior
 window algorithm (window   W)
 increase window by one per RTT
      W <- W +1/W per ACK
 loss indication of congestion
 decrease window by half on detection of loss,
       (triple duplicate ACKs), W <- W/2
receiver


           TD


sender
Generic TCP Behavior
 window algorithm (window   W)
 increase window by one per RTT
     W <- W +1/W per ACK
 halve window on detection of loss,   W <- W/2
 timeouts due to lack of ACKs -> window
  reduced to one, W <- 1
 receiver




sender
            TO
Generic TCP Behavior
 window algorithm (window   W)
 increase window by one per RTT (or one over
  window per ACK, W <- W +1/W)
 halve window on detection of loss, W <- W/2
 timeouts due to lack of ACKs, W <- 1
 successive timeout intervals grow
  exponentially long up to six times
    TCP throughput/loss relationship
                  loss occurs
                                Idealized model:
   W                             W is maximum supportable
                                  window size (then loss
  TCP                             occurs)
window
                                 TCP window starts at W/2
  size
                                  grows to W, then halves,
 W/2                              then grows to W, then
                                  halves…
                                 one window worth of
                                  packets each RTT
                                 to find: throughput as
         time (rtt)
                                  function of loss, RTT
    TCP throughput/loss relationship
                        # packets sent per “period” =

   W


  TCP
window
  size

 W/2
         period




           time (rtt)
    TCP throughput/loss relationship
                        # packets sent per “period” =
                               W W                 W /2
                                                          W
   W                            +  + 1 + ... + W   ( + n)
                               2  2                n 0 2
  TCP
                                 W    W W /2
window                           + 1 +  n
  size                           2    2 n 0
 W/2                             W    W W / 2(W / 2 + 1)
                                 + 1 +
         period                  2    2        2
                                 3    3
                                W2 + W
                                 8    4
                                  3 2
           time (rtt)           W
                                 8
    TCP throughput/loss relationship
                                                     3 2
                        # packets sent per “period”  W
                                                     8
   W
                          1 packet lost per “period” implies:
  TCP
window                               8             8
                          ploss         or: W 
  size                              3W 2         3 ploss
 W/2
         period
                                           3 packets
                          B  avg._thrup  W
                                        ut
                                           4       rtt
                                            1.22 packets
                          B  avg._thrup 
                                        ut
                                             ploss     rtt
           time (rtt)
                         B throughput formula can be extended
                         to model timeouts and slow start (PFTK)
Recall RED queue management
 dropping/marking
 packets depends
 on average queue
 length -> p = p(x)

                                              1


                      Marking probability p
 More generally:
 active queue
 management                                   pmax

 (AQM)                                               0   tmin   tmax
                                                                        2tmax
                                                         Average queue length x
Bottleneck behavior
                       bottleneck router:
                        capacity fully utilized
                        all interfering sessions
                         see same loss prob.
                        do all sessions see
                         same thruput?


        i Bi (RTTi ,p) = C
          C - router bandwidth
          Bi - throughput of flow i
 Single bottleneck: infinite flows

 N infinite TCP sessions
    two way propagation
     delay Ai, i = 1,…,N
    throughput Bi(p,RTTi)


 one bottleneck router
      RED queue management
        • avg. queue length x ; dropping probability p(x)
 to discover
    Bi: TCP sessions’ throughput,
    router behavior, e.g., drop prob. avg. queue len.
Model and solution
 model

          p = p(x)         (AQM)
          RTTi = Ai + x /C   (round trip time)
             i Bi (x) = C, for i =1 ,…,N
          i B (p , RTT i) = C, for i =1 ,…,N
 solve a fixed point problem for   x
 unique solution provided   B is monotonic and
  continuous on x
 resulting x can be used to obtain RTTi and p
       Model versus simulation: single
         bottleneck, infinite flows
• fixed router capacity 4 Mbps and RED parameters
• 10-120 TCP flows
• two-way prop. delay 20+2i ms, i = 1,…,N




            throughput              router loss
Bottleneck principle: a qualitative
result


                                     Bnew(p)
 new/improved,
           Bnew(p)




                     thruput
 TCP, BTCP(p)
                               BTCP(p)


Bnew(p) > BTCP(p)
                                         p
Sharing bottleneck with TCP

                                  C
           Nnew
           NTCP


 Nnew Bnew(p) + NTCP Bni(p) = C
           Bnew(p) > BTCP(p)

a win! friendly?                     p
Replacing TCP with TCP-new

  N Bnew(pnew) = C         C
       vs             N

  N BTCP(pTCP) = C
       pnew > pTCP

 a loss!

                          pTCP   pnew
 simple model for TCP   B c         , c ≈ 1.2
                                T p

 bottleneck principle




 multiple bottlenecks
 fluid models
Multiple Bottleneck: infinite flows
   N TCP flows
       throughputs B = <Bi (Ri,pi)>
   V congested AQM routers
       capacities C = <Cv >
       avg. queue lengths x = <xv >
       discard prob. p = <pv (xv )>



                       bottleneck router model

                      i Bi (x ) = Cv , v =1,…,V
                       V equations, V unknowns
 Results: multiple bottleneck, infinite flows

• tandem network core, 5 -
  10 routers
• 2-way propagation delay
  20-120 ms
• bandwidth, 2-6 Mbps
                                throughput
• PFTK model error
   • throughput < 10%
   • loss rate < 10%
   • avg. queue length < 15%
• similar results for cyclic
  networks
                                 router loss
Comments
 what about UDP / non-TCP flows?
     If there are “non-responsive” flows, just
      decrease bottleneck capacity by non-responsive
      flow rate
 what about short lived flows?
   Hard   (some work in sigcomm 2001 – massoulie)
 note: throughout, assumption that time to
 send packets in window is less that RTT
Dynamic (transient) analysis of TCP fluids

 model TCP traffic as fluid
 describe behavior of flows and queues using
  Ordinary Differential Equations
 solve resulting ODEs numerically
   Loss Model
                                 AQM Router
B(t)
                   Packet Drop/Mark     p(t)

Sender                                                   Receiver




                        Round Trip Delay (t)


         Loss Rate as seen by Sender: l(t) = B(t-t)*p(t-t)
A Single Congested Router

                         focus on  single
                            bottlenecked router
  TCP flow i                   capacity {C (packets/sec) }
                               queue length q(t)
                               discard prob. p(t)
                           N TCP flows thru router
                               window sizes Wi(t)
                               round trip time
                AQM
               router           Ri(t) = Ai+q(t)/C
                C, p           throughputs
                                Bi (t) = Wi(t)/Ri(t)
   Adding RED to the model

RED: Marking/dropping based on average queue length x(t)
                                     1
            Marking probability p




                                    pmax


                                           tmin   tmax   2tmax

                                           Average queue length x
                                                                      - q(t)
                                                                      - x(t)
    x(t): smoothed, time averaged q(t)

                                                                    t ->
    System of Differential Equations
      Timeouts and slow start ignored

Window Size: dWk  1 - p ( x (t - t k )) - Wk (t ) Wk (t - t k ) p ( x (t - t k ))
              dt         Rk (t )            2 Rk (t - t k )
                             Additive                Mult.           Loss arrival
                             increase              decrease             rate




                      dq                    Wk (t )
 Queue length:            -C 1{q > 0} + k
                      dt                    Rk (t )
                                Outgoing        Incoming
                                 traffic         traffic
 System of Differential Equations
 (cont.)
Average smoothed      dx ln(1 - a )          ln a
queue length:                      x (t ) -      q (t )
                      dt     d                d
          Where
          a = averaging parameter of RED(wth)
          d = sampling interval ~ 1/C

                       dp dp dx
Loss probability:        
                       dt dx dt
  Where dp is obtained from the marking profile
        dx
 N+2 coupled equations
N flows
                          dWi dt  f1  p, Ri , Wi ), i  1,  , N
Wi(t) = Window size
        of flow i

Ri(t) = RTT of flow i     dp dt  f 3 q )     dq dt  f 2 Wi )

p(t) = Drop probability

q(t) = queue length

       Equations solved numerically using MATLAB
Steady slate behavior
 let t → ∞
   dWk
        0,      p(t )  p, W (t )  W , Rk (t )  Rk
    dt
 this yields

        1 - p Wk Wk           2(1 - p)
     0      -      p or Wk 
         Rk    2 Rk               p
 the throughput is

                2(1 - p)         2
       Bk                           for small p
                Rk p           Rk p
A Queue is not a Network
                Network - set of AQM routers, V
                        sequence Vi for session i

                      Round trip time - aggregate delay
                                Ri(t) = Ai + vVi qv(t)


            Loss/marking probability - cumulative prob
                     pi (t) = 1-Pv Vi (1 - pv(qv(t)))

 Link bandwidth constraints

 Queue equations
How well does it work?
 OC-12 – OC-48 links
 RED with target delay
  5msec                                      OC-12
 2600 TCP flows
                                      OC-48



 decrease to 1300 at
  30 sec.                  2600  j                    2600  j
                                        1300  j
 increase to 2600 at 90
  sec.
                                      t=30           t=90
                       simulation
                       fluid model
 instantaneous delay




                           time (sec)

Good queue length match
              average window size
                                    simulation
                                    fluid model
window size




                                                                      simulation
                                                                      fluid model



                                                               time (sec)

                                                  time (sec)
                                                  matches average window size
Scaling Properties

           OC-12                            OC-12  j


        OC-48                         OC-48  j




 2600       1300      2600       2600  j                 2600  j
                                             1300  j


         t=30      t=90                 t=30            t=90


            Wk(t)            =          Wj k(t)

            qv(t)            =          qjv(t)/100
 Summary: TCP flows as fluids
What have we seen?
 model TCP as constant rate fluid flows
 rate sensitive to congestion via:
    capacities C = <Cv >
      avg. queue lengths x = <xv >
      discard prob. p = <pv (xv )>
 dynamic (transient) behavior of TCP modeled as
  system of differential equations


         ability to predict performance of
       system of TCP flows using fluid models

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:10
posted:12/9/2011
language:
pages:39