590 likes | 1.21k Views
Active Queue Management. Rong Pan Cisco System EE384y Spring Quarter 2008. 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.
E N D
Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2008
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
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
TCP+Queue Management- A closed-loop control system C W/R _ + q N + _ 0.5 - p Time Delay Queue Management + 1
Drop Tail- problems • Lock out • Full queue • Bias against bursty traffic • Global synchronization
Tail Drop Queue ManagementLock-Out Max Queue Length
Tail Drop Queue ManagementFull-Queue • Only drop packets when queue is full • long steady-state delay
Bias Against Bursty Traffic Max Queue Length
Tail Drop Queue ManagementGlobal Synchronization Max Queue Length
Alternative Queue Management Schemes • Drop from front on full queue • Drop at random on full queue • both solve the lock-out problem • both have the full-queues problem
Active Queue ManagementGoals • Solve tail-drop problems • no lock-out behavior • no full queue • no bias against bursty flow • no global synchronization • Provide better QoS at network nodes • low steady-state delay • lower packet dropping
Random Early Detection (RED) Arrivingpacket AvgQsize > Minth? no yes Admit the new packet AvgQsize > Maxth? no yes end Drop the new packet Admit packet with a probability p end end
RED Dropping Curve 1 Drop Probability maxp 0 minth maxth Average Queue Size
Effectiveness of RED- Lock-Out & Global Synchronization • Packets are randomly dropped • Each flow has the same probability of being discarded
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
What QoS 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
udp udp tcp tcp tcp udp tcp The Internet Connectionless; Best-Effort Bad News - unresponsive end hosts
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 with fairness enhancement: e.g. CHOKe, AFD, WRED
Active Queue Manament With Enhancement to Fairness FIFO • Approximate fair bandwidth allocation • Provide isolation from unresponsive flows • Be as simple as RED
CHOKe no Draw a packet at random from queue Flow id same as the new packet id ? no yes AvgQsize > Maxth? Drop both matched packets no yes Drop the new packet Admit packet with a probability p end end end RED Arrivingpacket AvgQsize > Minth? no yes Admit the new packet AvgQsize > Maxth? no yes end Drop the new packet Admit packet with a probability p end end
Random Sampling from Queue UDP flow • A randomly chosen packet more likely from the unresponsive flow • Adversary can’t fool the system
Comparison of Flow ID • Compare the flow id with the incoming packet • more acurate • Reduce the chance of dropping packets from a TCP-friendly flows.
Dropping Mechanism • Drop packets (both incoming and matching samples ) • More arrival -> More Drop • Give users a disincentive to send more
Simulation Setup S(1) D(1) S(2) 10Mbps 10Mbps D(2) m TCP m TCP Sources Sinks 1Mbps S(m) D(m) S(m+1) D(m+1) n UDP Sources n UDP Sinks S(m+n) D(m+n)
Network Setup Parameters • 32 TCP flows, 1 UDP flow • All TCP’s maximum window size = 300 • All links have a propagation delay of 1ms • FIFO buffer size = 300 packets • All packets sizes = 1 KByte • RED: (minth,maxth) = (100,200) packets
32 TCP, 1 UDP (one sample) 74.1% 23.0% 99.6%
Rk R2 R1 How Many Samples to Take? Maxth avg minth • Different samples for different Qlenavg • # samples when Qlenavg close to minth • # samples when Qlenavg close to maxth
AnalyticalModel discards from the queue permeable tube with leakage
Fluid Analysis • N: the total number of packets in the buffer • Li(t): the survival rate for flow i packets Li(t)t - Li(t +t)t = i tLi(t)t/N - dLi(t)/dt = i Li(t) N Li(0) = i (1-pi ) Li(D) = i (1-2pi )
Fluid Model - Multiple samples • Multiple samples are chosen Li(t)t - Li(t +t)t = Mi tLi(t)t/N - dLi(t)/dt = Mi Li(t) N Li(0) = i (1-pi )M Li(D) = i (1-pi )M - Mi pi
AFD: Goal • Approximate weighted bandwidth allocation • Not only AQM, approximate WDRR scheduling • Provide soft queues in addition to physical queues • Keep the state requirement small • Be simple to implement
Mfair = f(Qlen, Qlen_old,Qref) Fair Share Mi = Arrival estimate for Class i (Bytes over interval Ts) If Mi Mfair : No Drop (Di = 0) If Mi > Mfair : Di > 0 such that Mi (1-Di) = Mfair AFD Algorithm: Details (Basic Case: Equal Share) Di = Drop Probability for Class i Arriving Packets Qlen 1-Di Qref Class i Di
Mfair = f(Qlen, Qlen_old,Qref) Fair Share Mi = Arrival estimate for Class i (Bytes over interval Ts) 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, …) AFD Algorithm: Details (General Case) Di = Drop Probability for Class i Arriving Packets Qlen 1-Di Qref Class i Di
Not Per-Flow State Fraction of flows • State requirement on the order of # of unresponsive flows • Elephant Traps (developed jointly Stanford and Cisco)
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 each class) • observation of queue length as measure of congestion • perform selective dropping (pre-enqueue) to drive arrival rate to the desired departure rate
Different Number of TCP Flows in Each Class 10 TCP Flows Class 2 Class 1 5 TCP Flows 0 50 100 150 200 time 0 50 100 150 200 time 20 TCP Flows 15 TCP Flows Class 4 Class 3 0 50 100 150 200 time 0 50 100 150 200 time
AFD Implementation Issues • Monitor Arrival Rate • Determine Drop Probability • Maximize Link Utilization
Arrival Monitoring • Keep a counter for each class • Count the data arrivals (in bytes) of each class in 10ms interval: arvi • Arrival rate of each class is updated every 10ms • mi = mi(1-1/2c)+arvi • c determines the average window
Implementing the Drop Function • If Mi Mfairthen Di = 0 • Otherwise, rewrite the drop function as • Suppose we have predetermined drop levels, find the one such that Di* Mi = (Mi – Mfair)