Скачать презентацию Active Queue Management Rong Pan Cisco System EE Скачать презентацию Active Queue Management Rong Pan Cisco System EE

bd759bda03aa1ed86da51c121e6cd9f8.ppt

  • Количество слайдов: 54

Active Queue Management Rong Pan Cisco System EE 384 y Spring Quarter 2006 Active Queue Management Rong Pan Cisco System EE 384 y Spring Quarter 2006

Outline • Queue Management – Drop as a way to feedback to TCP sources Outline • Queue Management – Drop as a way to feedback to TCP sources – Part of a closed-loop • Traditional Queue Management – Drop Tail – Problems • Active Queue Management – RED – CHOKe – AFD 2

Queue Management: Drops/Marks - A Feedback Mechanism To Regulate End TCP Hosts • End Queue Management: Drops/Marks - A Feedback Mechanism To Regulate End TCP Hosts • End hosts send TCP traffic -> Queue size • Network elements, switches/routers, generate drops/marks based on their queue sizes • Drops/Marks: regulation messages to end hosts • TCP sources respond to drops/marks by cutting down their windows, i. e. sending rate 3

TCP+Queue Management - A closed-loop control system C W/R _ + N + q TCP+Queue Management - A closed-loop control system C W/R _ + N + q _ 0. 5 - + 1 Time Delay p Queue Management 4

Drop Tail - problems • Lock out • Full queue • Bias against bursty Drop Tail - problems • Lock out • Full queue • Bias against bursty traffic • Global synchronization 5

Tail Drop Queue Management Lock-Out Max Queue Length 6 Tail Drop Queue Management Lock-Out Max Queue Length 6

Tail Drop Queue Management Full-Queue • Only drop packets when queue is full – Tail Drop Queue Management Full-Queue • Only drop packets when queue is full – long steady-state delay 7

Bias Against Bursty Traffic Max Queue Length 8 Bias Against Bursty Traffic Max Queue Length 8

Tail Drop Queue Management Global Synchronization Max Queue Length 9 Tail Drop Queue Management Global Synchronization Max Queue Length 9

Alternative Queue Management Schemes • Drop from front on full queue • Drop at Alternative Queue Management Schemes • Drop from front on full queue • Drop at random on full queue F both solve the lock-out problem F both have the full-queues problem 10

Active Queue Management Goals • Solve tail-drop problems – no lock-out behavior – no Active Queue Management Goals • Solve tail-drop problems – no lock-out behavior – no global synchronization – no bias against bursty flow • Provide better Qo. S at a router – low steady-state delay – lower packet dropping 11

Random Early Detection (RED) Arriving packet no Avg. Qsize > Minth? yes Admit the Random Early Detection (RED) Arriving packet no Avg. Qsize > Minth? yes Admit the new packet end no Admit packet with a probability p end Avg. Qsize > Maxth? yes Drop the new packet end 12

Drop Probability RED Dropping Curve 1 maxp 0 minth maxth Average Queue Size 13 Drop Probability RED Dropping Curve 1 maxp 0 minth maxth Average Queue Size 13

Effectiveness of RED - Lock-Out & Global Synchronization • Packets are randomly dropped • Effectiveness of RED - Lock-Out & Global Synchronization • Packets are randomly dropped • Each flow has the same probability of being discarded 14

Effectiveness of RED - Full-Queue & Bias against bursty traffic • Drop packets probabilistically Effectiveness of RED - Full-Queue & Bias against bursty traffic • Drop packets probabilistically in anticipation of congestion – not when queue is full • Use qavg to decide packet dropping probability: allow instantaneous bursts 15

What Qo. S does RED Provide? • Lower buffer delay: good interactive service – What Qo. S does RED Provide? • Lower buffer delay: good interactive service – qavg is controlled to be small • Given responsive flows: packet dropping is reduced – early congestion indication allows traffic to throttle back before congestion • Given responsive flows: fair bandwidth allocation 16

Bad News - unresponsive end hosts udp tcp The Internet Connectionless; Best-Effort 17 Bad News - unresponsive end hosts udp tcp The Internet Connectionless; Best-Effort 17

Scheduling & Queue Management • What routers want to do? – isolate unresponsive flows Scheduling & Queue Management • What routers want to do? – isolate unresponsive flows (e. g. UDP) – provide Quality of Service to all users • Two ways to do it – scheduling algorithms: e. g. FQ, CSFQ, SFQ – queue management algorithms: e. g. RED, FRED, SRED 18

FQ vs. RED • Isolation from nonadaptive flows FQ • Hard/Expensive to implement • FQ vs. RED • Isolation from nonadaptive flows FQ • Hard/Expensive to implement • No isolation from nonadaptive flows RED • Easy to implement 19

Active Queue Manament With Enhancement to Fairness FIFO • Provide isolation from unresponsive flows Active Queue Manament With Enhancement to Fairness FIFO • Provide isolation from unresponsive flows • Be as simple as RED 20

CHOKe RED Arriving packet Avg. Qsize > Minth? no Draw a packet at yes CHOKe RED Arriving packet Avg. Qsize > Minth? no Draw a packet at yes random from queue Admit the new packet end no yes Flow id same as Avg. Qsize > Maxth? no the new packet id ? no yes Drop Max ? Admit packet with Avg. Qsize > the new packet Drop both th no matched packets a probability p yes end Admit packet with a probability p end Drop the new packet end 21

Random Sampling from Queue UDP flow • A randomly chosen packet more likely from Random Sampling from Queue UDP flow • A randomly chosen packet more likely from the unresponsive flow • Adversary can’t fool the system 22

Comparison of Flow ID • Compare the flow id with the incoming packet – Comparison of Flow ID • Compare the flow id with the incoming packet – more acurate – Reduce the chance of dropping packets from a TCPfriendly flows. 23

Dropping Mechanism • Drop packets (both incoming and matching samples ) – More arrival Dropping Mechanism • Drop packets (both incoming and matching samples ) – More arrival -> More Drop – Give users a disincentive to send more 24

Simulation Setup S(1) m TCP Sources S(2) S(m+1) D(1) 10 Mbps 1 Mbps D(2) Simulation Setup S(1) m TCP Sources S(2) S(m+1) D(1) 10 Mbps 1 Mbps D(2) m TCP Sinks D(m) D(m+1) n UDP Sources n UDP Sinks S(m+n) D(m+n) 25

Network Setup Parameters l 32 TCP flows, 1 UDP flow l All TCP’s maximum Network Setup Parameters l 32 TCP flows, 1 UDP flow l All TCP’s maximum window size = 300 l All links have a propagation delay of 1 ms l FIFO buffer size = 300 packets l All packets sizes = 1 KByte l RED: (minth, maxth) = (100, 200) packets 26

32 TCP, 1 UDP (one sample) 74. 1% 23. 0% 99. 6% 27 32 TCP, 1 UDP (one sample) 74. 1% 23. 0% 99. 6% 27

32 TCP, 5 UDP (5 samples) 28 32 TCP, 5 UDP (5 samples) 28

How Many Samples to Take? Rk Maxth l R 2 R 1 avg minth How Many Samples to Take? Rk Maxth l R 2 R 1 avg minth Different samples for different Qlenavg – # samples when Qlenavg close to minth – # samples when Qlenavg close to maxth 29

32 TCP, 5 UDP (selfadjusting) 30 32 TCP, 5 UDP (selfadjusting) 30

Analytical Model discards from the queue permeable tube with leakage 31 Analytical Model discards from the queue permeable tube with leakage 31

Fluid Analysis l N: the total number of packets in the buffer l Li(t): Fluid Analysis l N: the total number of packets in the buffer l Li(t): the survial rate for flow i packets Li(t) t - Li(t + t) t = i t Li(t) t /N - d. Li(t)/dt = i Li(t) N Li(0) = i (1 -pi ) Li(D) = i (1 -2 pi ) 32

Model vs Simulation - multiple TCPs and one UDP 1/(1+e) 33 Model vs Simulation - multiple TCPs and one UDP 1/(1+e) 33

Fluid Model - Multiple samples l Multiple samples are chosen Li(t) t - Li(t Fluid Model - Multiple samples l Multiple samples are chosen Li(t) t - Li(t + t) t = M i t Li(t) t /N - d. Li(t)/dt = M i Li(t) N Li(0) = i (1 -pi )M Li(D) = i (1 -pi )M - M i pi 34

Two Samples - multiple TCPs and one UDP 35 Two Samples - multiple TCPs and one UDP 35

Two Samples - multiple TCPs and two UDP 36 Two Samples - multiple TCPs and two UDP 36

What If We Use a Small Amount of State? 37 What If We Use a Small Amount of State? 37

AFD: Goal • Approximate equal bandwidth allocation – Not only AQM, approximate DRR scheduling AFD: Goal • Approximate equal bandwidth allocation – Not only AQM, approximate DRR scheduling – Provide soft queues in addition to physical queues • Keep the state requirement small • Be simple to implement 38

AFD Algorithm: Details (Basic Case: Equal Share) Di = Drop Probability for Class i AFD Algorithm: Details (Basic Case: Equal Share) Di = Drop Probability for Class i Arriving Packets Qlen 1 -Di Qref Class i Di Mi = Arrival estimate for Class i (Bytes over interval Ts) Mfair = Mfair - a (Qlen - Qref) + b (Qlen_old - Qref) Fair Share If Mi Mfair : No Drop (Di = 0) If Mi > Mfair : Di > 0 such that Mi (1 -Di) = Mfair 39

AFD Algorithm: Details (General Case) Di = Drop Probability for Class i Arriving Packets AFD Algorithm: Details (General Case) Di = Drop Probability for Class i Arriving Packets Qlen 1 -Di Qref Class i Di Mi = Arrival estimate for Class i (Bytes over interval Ts) Mfair = Mfair - a (Qlen - Qref) + b (Qlen_old - Qref) Fair Share If Mi F(Mfair, Mini, Maxi, Wi, …): No Drop (Di = 0) If Mi > Mfair : Di > 0 such that Mi (1 -Di) = F(Mfair, Mini, Maxi, Wi, …) 40

Not Per-Flow State Fraction of flows • State requirement on the order of # Not Per-Flow State Fraction of flows • State requirement on the order of # of unresponsive flows 41

AFD Solution: Details • Based on 3 simple mechanisms – estimate per “class” arrival AFD Solution: Details • Based on 3 simple mechanisms – estimate per “class” arrival rate • counting per “class” bytes over fixed intervals ( Ts ) • potential averaging over multiple intervals – estimate deserved departure rate (so as to achieve the proper bandwidth allocation for the class) • Observation and averaging of queue length as measure of congestion • Functional definition of “fair share” based on fairness criterion – perform probabilistic dropping (pre-enqueue) to drive arrival rate to equal desired departure rate 42

Mixed Traffic with Different Levels of Unresponsiveness 43 Mixed Traffic with Different Levels of Unresponsiveness 43

Drop Probabilities (note differential dropping) 44 Drop Probabilities (note differential dropping) 44

Different Number of TCP Flows in Each Class 2 Class 1 10 TCP Flows Different Number of TCP Flows in Each Class 2 Class 1 10 TCP Flows 5 TCP Flows 0 50 100 150 200 0 time 50 100 150 200 time 20 TCP Flows Class 3 Class 4 15 TCP Flows 0 50 100 150 200 time 0 50 100 150 45

Different Class Throughput Comparison 46 Different Class Throughput Comparison 46

Queue Length 47 Queue Length 47

Mfair 48 Mfair 48

AFD Implementation Issues • Monitor Arrival Rate • Determine Drop Probability • Maximize Link AFD Implementation Issues • Monitor Arrival Rate • Determine Drop Probability • Maximize Link Utilization 49

Arrival Monitoring • Keep a counter for each class – Count the data arrivals Arrival Monitoring • Keep a counter for each class – Count the data arrivals (in bytes) of each class in 10 ms interval: arvi • Arrival rate of each class is updated every 10 ms – mi = mi(1 -1/2 c)+arvi – c determines the average window 50

Implementing the Drop Function • If Mi Mfair then Di = 0 • Otherwise, Implementing the Drop Function • If Mi Mfair then Di = 0 • Otherwise, rewrite the drop function as • Suppose we have predetermined drop levels, find the one such that Di* Mi = (Mi – Mfair) 51

Implementing the Drop Function • Drop levels are: 1/32, 1/16, 3/32… • Suppose mi Implementing the Drop Function • Drop levels are: 1/32, 1/16, 3/32… • Suppose mi = 100, mfair = 62. 0 => Di = 0. 380, Di 0. 0 0. 375 0. 406 We choose the higher value using binary search 1. 0 52

AFD - Summary FQ Fairness AFD Ideal CHOKe RED Simplicity • Equal share is AFD - Summary FQ Fairness AFD Ideal CHOKe RED Simplicity • Equal share is approximated in a wide variety of settings • The state requirement is limited 53

Summary • Traditional Queue Management – Drop Tail, Drop Front, Drop Random – Problems: Summary • Traditional Queue Management – Drop Tail, Drop Front, Drop Random – Problems: lock-out, full queue, global synchronization, bias against bursty traffic • Active Queue Management – RED: can’t handle unresponsive flows – CHOKe: penalize unresponsive flows – AFD: provides approximate fairness with limited states 54