TCP, Active Queue Management and QoS

Size: px
Start display at page:

Download "TCP, Active Queue Management and QoS"

Transcription

1 TCP, Active Queue Management and QoS Don Towsley UMass Amherst Collaborators: W. Gong, C. Hollot, V. Misra

2 Outline motivation TCP friendliness/fairness bottleneck invariant principle active queue management (AQM) & RED QoS summary

3 Properties of TCP 90% of Internet traffic primary deliverer of multimedia (e.g., napster) conservative end-end congestion control (CC) additive increase multiplicative decrease CC equal bandwidth share only end-end protocol w. congestion control TCP can be pushed around TCP Mbs B 1 =5Mbs B 2 =5Mbs B 3 =5Mbs B 4 =5Mbs UDP-12Mbs TCP{ Mbs 12Mbs B 1 = 2Mbs B 2 = 2Mbs B 3 = 2Mbs B 4 = 2Mbs

4 Additive-Increase Multiplicative- Decrease (AIMD) Congestion Control r i - rate after i-th feedback r i+1 = r i + c if i -th feedback is no congestion r i+1 = a x r i if i -th feedback indicates congestion, a < 1 similar algorithms for window-based CC basic building block of most congestion control algorithms (e.g., TCP)

5 Example two sources, rates r i1, r 2 i bandwidth C initial rates r 1 and r 2 C (r 1,r 2 )... as time goes on, i increases, source rates converge to a fair share r i 2 r i 1 C (Chiu,Jain 89)

6 Generic TCP Behavior window algorithm (window W ) up to W packets can be in network return of ACK allows sender to send another packet ACKS cumulative increase window by one per RTT W < W +1/W per ACK W < W +1 per RTT seeks available network bandwidth

7 receiver sender W

8 Generic TCP Behavior window algorithm (window W) increase window by one per RTT W < W +1/W per ACK decrease window by half on detection of loss (triple duplicate ACK), W < W/2

9 receiver TD sender

10 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

11 receiver sender TO

12 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 slow start mechanism provides fair share, full use of bandwidth

13 IETF and TCP fairness IETF mandated (1997) : thou must be TCP fair original definition B MTU /(R * p ) p - loss probability; R - round trip time; MTU - pkt length; assumptions: no timeouts, independent losses

14 Derivation of p -1/2 expression equilibrium analysis focus on avg window size W drift down = drift up W(t) R p W/2 = (1-p) 1/W W = 2(1-p)/p t 2/p p small B = 2 /R p

15 How well does this work? unidirectional bulk transfer from UMass to INRIA 100 sec. samples significant number of timeouts in most traces p 1/2 formula inaccurate (1-2 orders of magnitude for large p) throughput measurements + measurements p Floyd 1/2 formula loss loss probability rate

16 Including timeouts: renewal theoretic approximation B (p,r ) [R (4p/3) 1/2 + T 0 3(3p/4) 1/2 p (1+32p 2 )] -1 T 0 - timeout length Basis of revised definition of TCP friendliness

17 Validation Experiments: 38 traces from 18 hosts unidirectional bulk transfers 100sec measurements Packets/s F F FFFF UMass - INRIA FFFFF F F FFF FFFF F F F Measured PFTK Full Model Model p 1/2 model Floyd/Ott Model FF F F F F F FF F Conclusions: good validation other studies support model insensitive to TCP version Loss probability (p) (Padhye, etal, 98)

18 Lessons TCP exhibits well defined bandwidth curve decreasing function of R and p timeouts important little difference between TCP versions AIMD, timeouts Vegas an exception

19 Bottleneck invariance principle bottleneck router where loss occurs high load, util. 1 bottleneck invariance principle (BIP) Σ i B i (R i,p) = C C - router bandwidth B i - throughput of flow i

20 Applications of BIP accurate models of networks supporting infinite/finite duration TCP flows thruput, loss rate, avg. queue length, provides simple checks of protocol design new improved congestion control algorithms forward error correction active queue management RED

21 New and improved TCP new/improved, B UMass (p) TCP, B TCP (p) thruput B TCP (p) B UMass (p) B UMass (p) > B TCP (p) p

22 Sharing bottleneck with TCP N UM C N TCP N UM B UM (p) + N TCP B ni (p) = C B UM (p) > B TCP (p) a win! friendly? p

23 Replacing TCP with UMass N B UM (p UM ) = C vs N B TCP (p TCP ) = C N C p UM > p TCP a loss! SACK worse than Reno? p TCP p UM

24 SACK vs Reno SACK ACK includes bit vector of status of most recent group of packets 1. one window reduction max per RTT 2. reduces timeout rate p SACK > p Reno at bottleneck (difference slight) 3. increases retransmission efficiency reduces duplicate packets benefits of 3. outweigh don t replace SACK with Reno!

25 10% pkt loss Use of FEC poor thruput C use packet level FEC! 10% TCP source encoder p decoder TCP rcvr

26 10% pkt loss Use of FEC poor thruput C use packet level FEC! 10% p FEC TCP source encoder p decoder TCP rcvr ACKs p FEC << p

27 Use of FEC available bandwidth, C FEC < C wo B FEC ( ) = B wo ( ) = B TCP ( ) N B wo (p wo ) = C wo N B FEC (p FEC ) = C FEC p > p FEC wo FEC reduces performance!

28 BIP can provide tremendous insight into TCP.

29 BIP can provide tremendous insight into congestion control.

30 Active queue management drop tail - drop pkt when buffer fills active queue management (AQM) proactively drop/mark packets before buffer overflow example: drop pkt with probability p(x) x - avg. queue length

31 RED (Random Early Detect) RED: marking/dropping based on average queue length x (t ) marking prob p 1 p max t min t max 2t max avg queue length x x (t) : smoothed, time averaged q (t) x (t i +1) = α q (t i +δ) + (1-α) x (t i ) - q (t ) - x (t ) t

32 Droptail vs. RED Experiment (Christiansen, etal, SIGCOMM 00) finite duration http flows into router low load no difference high load droptail often produces lower latencies careful tuning of RED can reduce difference Why?

33 Droptail vs. RED: high load bottleneck router q DT > q RED R = A + q/c R DT > R RED p DT < p RED longer latencies for finite duration flows under RED true for other AQM policies Solution - packet marking (ECN) q Drop tail q RED

34 RED discard function RED queue N identical TCP sources B(R,p) = C/N p increases with N N C N 1 < N 2 < N 3 < N 4 N 1 N 4? p max N N N t max

35 RED discard function RED queue N identical TCP sources B(R,p) = C/N p increases with N N C t max N 4 p max t max

36 RED discard function RED queue N identical TCP sources B(R,p) = C/N p increases with N once p > p max, queue oscillates around t max RED unstable! N C p max (Firoiu, Borden, 00) t max

37 Improved RED Marking prob. p 1 p max t min t max 2t max discontinuity removed in gentle_ variant Avg queue length x

38 Another problem queue length smoothing adds delay to control loop generates queue length oscillations solution requires other tools fluid models differential equations control theory 1 W! W _ q! q _ 1 1 N R R 1 2 C Time Delay R tt 1 R p Control law (e.g. RED)

39 30 long-lived, 60 short lived flows default ns RED parameters RED wo smoothing better than RED w smoothing - RED with smoothing - RED wo smoothing queue size (pkts) time (seconds)

40 Solution remove smoothing (May, etal, 00; Hollot, etal INFOCOM 01) but feedback delay + queue fill/empty times remain use classical methods to compensate for delays (Hollot, etal, INFOCOM 01) addition of phase lead PI control (also Low 00)

41 Improving congestion control PI controller vs. RED time varying http, ftp workload PI controller: faster response, decouples queue size and load level queue length Queue length vs. Time - PI Controller - RED Controller time

42 TCP and QoS proper design of TCP affects QoS AQM design significantly impacts QoS most DiffServ proposals rely on RED no additional mechanisms required for underloaded network call admission required for overloaded network

43 Summary although complex, TCP is well behaved and easy to characterize BIP can provide tremendous insight AQM not useful without marking RED is flawed AQM policy control theory explains flaws, suggests better designs