Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMP680E by M. Hamdi 1 Traffic Managers: Active Queue Management Algorithms.

Similar presentations


Presentation on theme: "COMP680E by M. Hamdi 1 Traffic Managers: Active Queue Management Algorithms."— Presentation transcript:

1 COMP680E by M. Hamdi 1 Traffic Managers: Active Queue Management Algorithms

2 COMP680E by M. Hamdi 2 Queuing Disciplines Each router must implement some queuing discipline Queuing allocates both bandwidth and buffer space: –Bandwidth: which packet to serve (transmit) next - This is scheduling –Buffer space: which packet to drop next (when required) – this buffer management Queuing affects the delay of a packet (QoS)

3 COMP680E by M. Hamdi 3 Queuing Disciplines Traffic Sources Class C Class B Class A Traffic Classes Drop Scheduling Buffer Management

4 COMP680E by M. Hamdi 4 Active Queue Management Queue Sink Outbound LinkRouterInbound Link Sink TCP ACK… Queue Sink Outbound LinkRouterInbound Link Sink TCP ACK… Queue Sink Outbound LinkRouterInbound Link Sink TCP ACK… Drop!!! Queue Sink Outbound LinkRouterInbound Link Sink TCP Queue Sink Outbound LinkRouterInbound Link Sink TCP AQM Congestion Congestion Notification… ACK… Queue Sink Outbound LinkRouterInbound Link Sink TCP AQM Advantages Reduce packet losses (due to queue overflow) Reduce queuing delay

5 COMP680E by M. Hamdi 5 QoS Router Policer Classifier Policer Classifier Per-flow Queue Scheduler Per-flow Queue Scheduler Per-flow Queue shaper Queue management

6 COMP680E by M. Hamdi 6 Packet Drop Dimensions Aggregation Per-connection state Single class Drop position Head Tail Random location Class-based queuing Early drop Overflow drop

7 COMP680E by M. Hamdi 7 Typical Internet Queuing FIFO + drop-tail –Simplest choice –Used widely in the Internet FIFO (first-in-first-out) –Implies single class of traffic Drop-tail –Arriving packets get dropped when queue is full regardless of flow or importance Important distinction: –FIFO: scheduling discipline –Drop-tail: drop policy (buffer management)

8 COMP680E by M. Hamdi 8 FIFO + Drop-tail Problems FIFO Issues: (irrespective of the aggregation level) –No isolation between flows: full burden on e2e control (e..g., TCP) –No policing: send more packets  get more service Drop-tail issues: –Routers are forced to have have large queues to maintain high utilizations –Larger buffers => larger steady state queues/delays –Synchronization: end hosts react to the same events because packets tend to be lost in bursts –Lock-out: a side effect of burstiness and synchronization is that a few flows can monopolize queue space

9 COMP680E by M. Hamdi 9 Synchronization Problem Because of Congestion Avoidance in TCP cwnd TimeRTT 1 2 4 Slow Start W* W W+1 RTT Congestion Avoidance W*/2

10 COMP680E by M. Hamdi 10 Synchronization Problem Queue Size Time Total Queue All TCP connections reduce their transmission rate on crossing over the maximum queue size. The TCP connections increase their tx rate using the slow start and congestion avoidance. The TCP connections reduce their tx rate again. It makes the network traffic fluctuate.

11 COMP680E by M. Hamdi 11 Global Synchronization Problem Can result in very low throughput during periods of congestion Max Queue Length

12 COMP680E by M. Hamdi 12 Global Synchronization Problem  TCP Congestion control Synchronization: leads to bandwidth under-utilization Persistently full queues: leads to large queueing delays Cannot provide (weighted) fairness to traffic flows – inherently proposed for responsive flows Flow 1 Rate Time Flow 2 Aggregate load bottleneck rate

13 COMP680E by M. Hamdi 13 Lock-out Problem Lock-Out: In some situations tail drop allows a single connection or a few flows (misbehaving flows: UDP) to monopolize queue space, preventing other connections from getting room in the queue. This "lock-out" phenomenon is often the result of synchronization. Lock-Out: In some situations tail drop allows a single connection or a few flows (misbehaving flows: UDP) to monopolize queue space, preventing other connections from getting room in the queue. This "lock-out" phenomenon is often the result of synchronization. Max Queue Length

14 COMP680E by M. Hamdi 14 Bias Against Bursty Traffic During dropping, bursty traffic will be dropped in benchs – which is not fair for bursty connections Max Queue Length

15 COMP680E by M. Hamdi 15 Active Queue Management Goals Solve lock-out and full-queue problems –No lock-out behavior –No global synchronization –No bias against bursty flow Provide better QoS at a router –Low steady-state delay –Lower packet dropping

16 COMP680E by M. Hamdi 16 RED (Random Early Detection) FIFO scheduling Buffer management: –Probabilistically discard packets –Probability is computed as a function of average queue length Discard Probability Average Queue Length 0 1 min_thmax_th queue_len

17 COMP680E by M. Hamdi 17 Random Early Detection (RED)

18 COMP680E by M. Hamdi 18 RED operation Min thresh Max thresh Average queue length minthreshmaxthresh MaxP 1.0 Avg length P(drop)

19 COMP680E by M. Hamdi 19 Define Two Threshold Values RED (Random Early Detection) FIFO scheduling Min thresh Max thresh Average queue length Make Use of Average Queue Length Case 1: Average Queue Length < Min. Thresh Value Admit the New Packet

20 COMP680E by M. Hamdi 20 RED (Cont’d) Min thresh Max thresh Average queue length Case 2: Average Queue Length between Min. and Max. Threshold Value p 1-p Admit the New Packet With Probability p … p 1-p Or Drop the New Packet With Probability 1-p

21 COMP680E by M. Hamdi 21 Random Early Detection Algorithm ave = (1 – w q )ave + w q q P = max_P*(avg_len – min_th)/(max_th – min_th) for each packet arrival: calculate the average queue size ave if ave ≤ min th do nothing else if min th ≤ ave ≤ max th calculate drop probability p drop arriving packet with probability p else if max th ≤ ave arriving packet drop the arriving packet

22 Random early detection (RED) packet drop Max threshold Min threshold Average queue length Forced drop Probabilistic early drop No drop Time Drop probability Max queue length

23 COMP680E by M. Hamdi 23 Time Max Queue Size Active Queue Management Random Early Detection (RED) Weighted average accommodates bursty traffic Max Threshold Min Threshold Forced drop Probabilistic drops No drops Drop probability Average queue length l l Probabilistic drops » »avoid consecutive drops » »drops proportional to bandwidth utilization – –(drop rate equal for all flows)

24 COMP680E by M. Hamdi 24 RED Vulnerable to Misbehaving Flows 0102030405060708090100 0 200 400 600 800 1,000 1,200 1,400 FIFO RED UDP blast TCP Throughput (Kbytes/Sec) Time (seconds)

25 COMP680E by M. Hamdi 25 Effectiveness of RED - Lock-Out & Global Synchronization Packets are randomly dropped Each flow has the same probability of being discarded

26 COMP680E by M. Hamdi 26 Effectiveness of RED - Full-Queue & Bias against bursty traffic Drop packets probabilistically in anticipation of congestion –Not when queue is full Use q avg to decide packet dropping probability : allow instantaneous bursts

27 COMP680E by M. Hamdi 27 What QoS does RED Provide? Lower buffer delay: good interactive service –q avg is controlled to be small Given responsive flows: packet dropping is reduced –Early congestion indication allows traffic to throttle back before congestion RED provide small delay, small packet loss, and high throughput (when it has responsive flows).

28 COMP680E by M. Hamdi 28 Weighted RED (WRED) WRED provides separate thresholds and weights for different IP precedences, allowing us to provide different quality of service to different traffic Lower priority class traffic may be dropped more frequently than higher priority traffic during periods of congestion

29 COMP680E by M. Hamdi 29 Random Dropping WRED (Cont..) High Priority traffic Medium Priority traffic Low Priority traffic

30 COMP680E by M. Hamdi 30 Average Queue Depth Standard Minimum Threshold Premium Minimum Threshold Std and Pre Maximum Threshold Adds Per-Class Queue Thresholds for Differential Treatment Two Classes are Shown; Any number of classes Can Be Defined Congestion Avoidance: Weighted Random Early Detection (WRED) Probability of Packet Discard

31 COMP680E by M. Hamdi 31 Problems with (W)RED – unresponsive flows

32 COMP680E by M. Hamdi 32 Vulnerability to Misbehaving Flows TCP performance on a 10 Mbps link under RED in the face of a “UDP” blast

33 COMP680E by M. Hamdi 33 Vulnerability to Misbehaving Flows Try to look at the following example: Assume there is a network which is set up as: UDP sources R1R2 S(m) S(1) S(m+1) S(m+n) S(m) S(1) S(m+1) S(m+n) 10Mbps 100Mbps TCP sources UDP sources

34 COMP680E by M. Hamdi 34 Vulnerability to Misbehaving Flows

35 COMP680E by M. Hamdi 35 Vulnerability to Misbehaving Flows Queue Size versus Time Delay is bounded Delay is bounded Global Synchronization solved RED: Queue Size

36 COMP680E by M. Hamdi 36 Unfairness of RED Unresponsive Flow (such as UDP) 32 TCP Flows 1 UDP Flow 32 TCP Flows 1 UDP Flow An unresponsive flow occupies over 95% of bandwidth An unresponsive flow occupies over 95% of bandwidth

37 COMP680E by M. Hamdi 37 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., WFQ, WRR –Queue management algorithms: e.g., RED, FRED, SRED

38 COMP680E by M. Hamdi 38 The setup and problems l l In a congested network with many users l l QoS requirements are different l l Problem: q q Allocate bandwidth fairly

39 COMP680E by M. Hamdi 39 l l Network node: Fair Queueing (FQ) l l User traffic: any type Problem: complex implementation lots of work per flow Approach 1: Network-Centric

40 COMP680E by M. Hamdi 40 Approach 2: User-Centric l l Network node : n n simple FIFO buffer; n n active queue management (AQM): RED l l User traffic: congestion-aware (e.g. TCP) Problem: requires user cooperation

41 COMP680E by M. Hamdi 41 Current Trend l l Network node: n n simple FIFO buffer n n AQM schemes with enhancement to provide fairness: preferential dropping packets l l User traffic: any type

42 COMP680E by M. Hamdi 42 Packet Dropping Schemes l l Size-based Schemes n n drop decision based on the size of FIFO queue n n e.g. RED l l Content-based Schemes n n drop decision based on the current content of the FIFO queue n n e.g. CHOKe l l History-based Schemes n n keep a history of packet arrivals/drops to guide drop decision n n e.g. SRED, RED with penalty box, AFD

43 COMP680E by M. Hamdi 43 CHOKe (no state information)

44 COMP680E by M. Hamdi 44 Random Sampling from Queue A randomly chosen packet more likely from the unresponsive flow Unresponsive flows can’t fool the system

45 COMP680E by M. Hamdi 45 Comparison of Flow ID Compare the flow id with the incoming packet –More accurate –Reduce the chance of dropping packets from a TCP- friendly flows

46 COMP680E by M. Hamdi 46 Dropping Mechanism Drop packets (both incoming and matching samples) –More arrival  More Drop –Give users a disincentive to send more

47 COMP680E by M. Hamdi 47 CHOKe (Cont’d) Min thresh Max thresh Average queue length Case 1: Average Queue Length < Min. Thresh Value Admit the New Packet

48 COMP680E by M. Hamdi 48 CHOKe (Cont’d) Min thresh Max thresh Average queue length p 1-p Case 2: Avg. Queue Length is between Min. and Max. Threshold Values A packet is randomly chosen from the queue to compare with the new arrival packet If they are from different flows, the same logic in RED applies If they are from the same flow, both packets will be dropped

49 COMP680E by M. Hamdi 49 CHOKe (Cont’d) Min thresh Max thresh Average queue length Case 3: Avg. Queue Length > Max. Threshold Value A random packet will be chosen for comparison If they are from different flows, the new packet will be dropped If they are from the same flow, both packets will be dropped

50 COMP680E by M. Hamdi 50 Simulation Setup

51 COMP680E by M. Hamdi 51 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 = 1KByte RED: (min th, max th ) = (100,200) packets

52 COMP680E by M. Hamdi 52 32 TCP, 1 UDP (one sample)

53 COMP680E by M. Hamdi 53 32 TCP, 5 UDP (5 samples)

54 COMP680E by M. Hamdi 54 How Many Samples to Take? Different samples for different Qlen avg –# samples decrease when Qlen avg close to min th –# samples increase when Qlen avg close to max th

55 COMP680E by M. Hamdi 55 32 TCP, 5 UDP (self-adjusting)

56 COMP680E by M. Hamdi 56 Two Problems of CHOKe Problem I: –Unfairness among UDP flows of different rates Problem II: –Difficulty in choosing automatically how many to drop

57 COMP680E by M. Hamdi 57 SAC (Self Adjustable CHOKe Tries to Solve the previously mentioned two problems

58 COMP680E by M. Hamdi 58 SAC Problem 1: Unfairness among UDP flows of different rates (e.g., when k =1, the UDP flow 31 (6 Mbps) has 1/3 throughput of UDP flow 32 (1 Mbps), and when k =10, throughput of UDP flow 31 is almost 0).

59 COMP680E by M. Hamdi 59 SAC Problem 2: Difficulty in choosing automatically how many to drop (when k = 4, UDPs occupy most of the BW. When k =10, relatively good fair sharing, and when k = 20, TCPs get most of the BW).

60 COMP680E by M. Hamdi 60 SAC Solutions: 1.Search from the tail of the queue for a packet with the same flow number and drop this packet instead of random dropping – because the higher a flow rate is, the more likely its packets will gather at the rear of the queue. The queue occupancy will be more evenly distributed among the flows. 2. Automate the process of determining k according to traffic status (number of active flows and number of UDP flows)

61 COMP680E by M. Hamdi 61 SAC Once an incoming UDP is compared with a randomly selected packet, if they are of the same flow, P is updated in this way: P  (1-w p ) P + w p. If they are of different flows, P is updated as follows: P  (1-w p ) P. If P is small, then there are more competing flows, and we should increase the value of k. Once there is an incoming packet, if it is a UDP packet, R is updated in this way: R  (1-w r ) R+ w r.. If it is a TCP packet, R is updated as follows: R  (1-w r ) R. If R is large, then we have a large amount of UDP traffic, and we should increase k to drop more UDP packets.

62 COMP680E by M. Hamdi 62 SAC simulation Throughput per flow (30 TCP flows and 2 UDP flows of different rate)

63 COMP680E by M. Hamdi 63 SAC simulation Throughput per flow (30 TCP flows and 4 UDP flows of the same rate).

64 COMP680E by M. Hamdi 64 SAC simulation Throughput per flow (20 TCP flows and 4 UDP flows of different rates)

65 COMP680E by M. Hamdi 65 AQM Using “Partial” state information

66 COMP680E by M. Hamdi 66 Congestion Management and Avoidance: Goal  Provide fair bandwidth allocation similar to WFQ  Be simple to implement like RED Simplicity Fairness WFQ RED Ideal

67 COMP680E by M. Hamdi 67 Objective: achieve fairness close to that of max-min fairness 1. 1.If W(f) < C/N, then set R(f) = W(f). 2. 2.If W(f) > C/N, then set R(f) = C/N. Formulation: – –Ri: the sending rate of flow i – –Di: the drop probability of flow i – –Ideally, we want » »Ri (1 – Di) = R fair (equal share) » »Di = (1 – R fair /Ri) + (That is, drop the excess) AQM Based on Capture Recapture

68 COMP680E by M. Hamdi 68 AQM Based on Capture-Recapture: Incoming packets Active Queue Management The estimation of the sending rate The estimation of the fair share The adjustment mechanism The key question is: how to estimate the sending rate (Ri) and the fair share (R fair ) !!! Fair allocation of BW

69 COMP680E by M. Hamdi 69 Capture-Recapture Models The CR models were originally developed for estimating demographic parameters of animal populations (e.g., population size, number of species, etc.). –It is an extremely useful method where inspecting the whole state space is infeasible or very costly –Numerous models have been developed to various situtations The CR models are being used in many diverse fields ranging from software inspection to epidemiology. It is based on several key ideas: animals are captured randomly, marked, released and then recaptured randomly from the population.

70 COMP680E by M. Hamdi 70 Capture-Recapture Models Simple model: estimate a homegeneous population of animals (N): –n 1 animals are captured (marked) –n2 animals were recaptured, and –m2 of these appeared to be marked. Under this simple capture recapture model (M 0 ): m 2 /n 2 = n 1 /N N n1 N n2 N n1 n2 m2

71 COMP680E by M. Hamdi 71 Capture-Recapture Models The capture probability refers to the chance that an individual animal get caught. M 0 implies that the capture probability for all animals are the same. –‘0’ refers to constant capture probability Using the M h model, the capture probabilities vary by animal, sometimes for reasons like difference in species, sex, or age, etc.. –‘ h’ refers to heterogeneity.

72 COMP680E by M. Hamdi 72 Capture-Recapture Models Estimation of N under the M h Model is based on the capture frequency data f 1, f 2 …, and f t (t captures) –f 1 is the number of animals that were caught only once, –f 2 is the number of animals that were caught only twice, … etc. The jackknife estimator of N is computed as a linear combination of these capture frequencies, s.t.: N = a 1 f 1 + a 2 f 2 + … + a t f t where a i are coefficients which are a function of t.

73 COMP680E by M. Hamdi 73 AQM Based on Capture-Recapture The key question is: how to estimate the sending rate (Ri) and the fair share (R fair ) !!! We use an arrival buffer to store the recently arrived packet headers (we can have control over how large the buffer is, and is a better representation of the nature of the flows when compared to the sending buffer): 1.We estimate Ri using the M 0 capture-recapture model 2.We estimate R fair using the M h capture-recapture model (by estimating the number of active flows).

74 COMP680E by M. Hamdi 74 AQM Based on Capture-Recapture  Ri is estimated for every arriving packet (we can increase the accuracy by having multiple captures, or decrease it by capturing packets periodically) If the arrival buffer is of size B, and the number of captured packets is Ci, then Ri = R Ci/B where R is the aggregate arrival rate  Rfair may not change every single time slot (as a result, the capturing and the calculation of the number of active flows could be done independently of the arrival of each incoming packet) R fair = R/(number of active flows)  The capture-recapture model gives us a lot of flexibility in terms of accuracy vs. complexity  The same capture-recapture can be used for calculating both Ri and R fair

75 COMP680E by M. Hamdi 75 AQM Based on Capture- Recapture Incoming packets Active Queue Management (Capture-Recapture) The estimation of Ri by the M 0 model The estimation of Rfair by the Mh CR model Di = (1 – Rfair/Ri)+ Fair allocation of BW

76 COMP680E by M. Hamdi 76 Performance evaluation This is a classical setup that researchers use to evaluate AQM schemes (we can vary many parameters, responsive vs. non- responsive connections, the nature of responsiveness, link delays, etc.) UDP sources R1R2 S(m) S(1) S(m+1) S(m+n) S(m) S(1) S(m+1) S(m+n) 10Mbps 100Mbps TCP sources UDP sources

77 COMP680E by M. Hamdi 77 Performance evaluation Estimation of the number of flows

78 COMP680E by M. Hamdi 78 Performance evaluation Bandwidth allocation comparison between CAP and RED

79 COMP680E by M. Hamdi 79 Performance evaluation Bandwidth allocation comparison between CAP and SRED

80 COMP680E by M. Hamdi 80 Performance evaluation Bandwidth allocation comparison between CAP and RED-PD

81 COMP680E by M. Hamdi 81 Performance evaluation Bandwidth allocation comparison between CAP and SFB

82 COMP680E by M. Hamdi 82 Normalized Measure of Performance A single comparison of the fairness using a normalized value, where norm is defined as: where b i is ideal fair share, b j is the bandwidth received by each flow Thus, ||BW|| = 0 for the ideal fair sharing

83 COMP680E by M. Hamdi 83 Normalized Measure of Performance

84 COMP680E by M. Hamdi 84 Performance Evaluation: Variable amount of unresponsiveness


Download ppt "COMP680E by M. Hamdi 1 Traffic Managers: Active Queue Management Algorithms."

Similar presentations


Ads by Google