Active Queue Management



Similar documents
Transcription:

Active Queue Management TELCOM2321 CS2520 Wide Area Networks Dr. Walter Cerroni University of Bologna Italy Visiting Assistant Professor at SIS, Telecom Program Slides partly based on Dr. Znati s material

Reading Textbook, Chap. 17, Section 17.3 S. Floyd, V. Jacobson Random Early Detection Gateways for Congestion Avoidance IEEE/ACM Transactions on Networking Vol. 1, No. 4, August 1993, pp. 397-413. http://ieeexplore.ieee.org B. Braden et al. Recommendations on Queue Management and Congestion Avoidance in the Internet IETF RFC 2309, April 1998 http://www.rfc-editor.org/rfc/rfc2309.txt 2

Queue Management in Network Nodes Networks should adopt a congestion control mechanism open-loop proactively tries to avoid congestion closed-loop reacts to congestion events Network nodes should implement weighted fair scheduling algorithms to meet QoS requirements of different traffic flows Network nodes should decide when to drop a packet can they do better than just dropping a packet when it arrives and finds a full queue? (drop-tail, passive approach) Active queue management techniques come into play to reduce or avoid the chance of severe congestion to achieve unbiased packet dropping in queues shared by multiple flows 3

Drop-tail in case of congestion Drop-tail is simple but has several drawbacks a few connections may monopolize the queue space and prevent other flows to enter the queue (lock-out) queues become full without any signal of raising congestion bursty connections are penalized e2e closed-loop congestion control schemes react to packet drops only when sources are notified; meanwhile the queue stays full and congestion continues global synchronization problem all sources adopting implicit notification based on packet loss back off simultaneously total sending rate is suddenly reduced and congestion is relieved network is underutilized sources start increasing sending rate congestion occurs again... 4

Passive vs. Active Queue Management Passive alternatives drop-head: when a packet arrives to a full queue, drop the first packet in line random drop: when a packet arrives to a full queue, drop random packet (more complex) they avoid the lock-out problem, but keep queues full and do not solve global synchronization Active approach: early dropping when congestion arises give sources enough time to react to congestion before queues fill up do not keep queues full drop packets selectively to avoid global synchronization 5

Random Early Detection (RED) RED is an Active Queue Management scheme for Internet routers tailored for TCP connections across IP routers RED design goals congestion avoidance global synchronization avoidance avoidance of bias against bursty traffic bound on average queue length to limit delay RED basic steps 1. define two thresholds for queue size TH MIN, TH MAX 2. at packet arrival, compute the average queue size AVG 3. if AVG < TH MIN queue packet (no congestion) 4. else if AVG > TH MAX drop packet (severe congestion) 5. else drop packet with probability P a (raising congestion) 6

RED: statistical approach to early drop P a 1 AVG TH MAX TH MIN 0 7

RED: Average Queue Size The average queue size at arrival k is calculated using an Exponential Weighted Moving Average (EWMA) of current and previous queue lengths Q k, Q k-1, Q k-2,... AVG k = (1 w) AVG k-1 + w Q k Why an average queue size is used, when the actual current queue size is known at the router when the packet arrives? using average allows filtering out transient congestion at the router (low-pass filter) weighted average allows to tune the contribution of the current queue size (typically w = 0.002) 8

RED: Average Queue Size During idle periods the average is not updated If the queue is empty at the arrival of a packet (Q k = 0), the number M of packets that could have been transmitted by the router during the idle period is estimated t k, k-th packet arrival time t IDLE, start of queue idle time M = F(t k t IDLE ), linear function of idle interval AVG k = (1 w) M AVG k-1 9

RED: Drop Probability Critical region, TH MIN AVG TH MAX count, number of consecutive packets queued since last discard while in the critical region First, the linear probability P b is computed P b = P MAX AVG TH MIN TH MAX TH MIN typically P MAX = 0.02 Then, the drop probability is defined as P a = P b 1 count P b 0 count < 1/P b 10

RED: Drop Probability Drop probability 1 0.8 0.6 0.4 0.2 count 0 count 1 count 2 count 3 count = 4 P MAX = 0.2 0 0 2 4 6 8 10 Averare Average queue size TH MIN TH MAX 11

RED: Drop Probability Why such a complex probability model? Probabilistic phenomena typically produce clusters flipping a fair coin many times does not necessarily produce a uniform alternating series of heads and tails Using the simple linear probability P b results in geometric drop distribution after a packet drop consider a constant AVG X = no. of arrivals between two consecutive drops Prob[X = n] = (1 P b ) n 1 P b Packets close together are likelier to be dropped global synchronization bursty sources are penalized 12

RED: Drop Probability RED attempts to space the drops evenly so that a bursty source is not penalized Using P a results in uniform drop distribution after a packet drop Prob[X = 1] = P a/count = 0 = P b Prob[X = 2] = (1 P a/count = 0 ) P a/count = 1 = P b Prob[X = 3] = (1 P a/count = 0 ) (1 P a/count = 1 ) P a/count = 2 = P b... Prob[X = n] = P b 0 < n 1/P b Prob[X = n] = 0 n > 1/P b 13

RED: Performance 14

RED: Variants Weighted RED (WRED) drops different flows with different probabilities TH MIN, TH MAX, P MAX are chosen based on flow priority low priority flows are dropped more aggressively RED with In/Out (RIO) edge nodes mark non-conforming packets (out-of-profile) according to traffic description different TH MIN, TH MAX, P MAX are chosen for in-profile and out-ofprofile packets out-of-profile packets are dropped more aggressively EWMA for in-profile packets is computed considering those packet only EWMA for out-of-profile packet is computed considering all packets provides traffic isolation for in-profile traffic 15