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
2
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
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
4
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
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
6
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 THMIN, THMAX
2. at packet arrival, compute the average queue size AVG 3. if AVG < THMINqueue packet (no congestion)
4. else if AVG > THMAXdrop packet (severe congestion)
RED: statistical approach to early drop
AVG
Pa 1
8
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)
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)
MAVG
k-110
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
bis computed
P
b= P
MAXtypically P
MAX= 0.02
• Then, the drop probability is defined as
P
a= 0
≤
count < 1/P
bAVG – TH
MINTH
MAX– TH
MINP
b1 – count P
bRED: Drop Probability
0 0.2 0.4 0.6 0.8 1 0 2 4 6 8 10 D ro p p ro b a b il it y count = 0 count = 1 count = 2 count = 3 count = 4 PMAX= 0.212
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
bresults 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 – 1P
b
• Packets close together are likelier to be dropped
– global synchronization – bursty sources are penalized
RED: Drop Probability
• RED attempts to space the drops evenly so that a bursty
source is not penalized
• Using P
aresults in uniform drop distribution after a packet
drop
Prob[X = 1] = P
a/count = 0= P
bProb[X = 2] = (1 – P
a/count = 0) P
a/count = 1= P
bProb[X = 3] = (1 – P
a/count = 0) (1 – P
a/count = 1) P
a/count = 2= P
b...
Prob[X = n] = P
b0 < n
≤
1/P
bProb[X = n] = 0
n > 1/P
b14
RED: Variants
• Weighted RED (WRED)
– drops different flows with different probabilities – THMIN, THMAX, PMAXare 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 THMIN, THMAX, PMAXare chosen for in-profile and
out-of-profile 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