Title: Active Queue Management
1Active Queue Management
Rong Pan Cisco System EE384y Spring Quarter 2008
2Outline
- 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
3Queue Management Drops/Marks- A Feedback
Mechanism To Regulate End TCP Hosts
- End hosts send TCP traffic -gt 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
4TCPQueue Management- A closed-loop control
system
C
W/R
_
q
?
N
?
_
0.5
-
p
Queue Management
Time Delay
1
5Drop Tail- problems
- Lock out
- Full queue
- Bias against bursty traffic
- Global synchronization
6Tail Drop Queue ManagementLock-Out
Max Queue Length
7Tail Drop Queue Management Full-Queue
- Only drop packets when queue is full
- long steady-state delay
-
8Bias Against Bursty Traffic
Max Queue Length
9Tail Drop Queue ManagementGlobal Synchronization
Max Queue Length
10Alternative 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
11Active 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
12Random Early Detection (RED)
Arriving packet
AvgQsize gt Minth?
no
yes
Admit the new packet
AvgQsize gt Maxth?
no
yes
end
Drop the new packet
Admit packet with a probability p
end
end
13RED Dropping Curve
1
Drop Probability
maxp
0
minth
maxth
Average Queue Size
14Effectiveness of RED- Lock-Out Global
Synchronization
- Packets are randomly dropped
- Each flow has the same probability of being
discarded
15Effectiveness 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
16What 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
17Bad News - unresponsive end hosts
18Scheduling 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
19Active Queue Manament With Enhancement to Fairness
FIFO
- Approximate fair bandwidth allocation
- Provide isolation from unresponsive flows
- Be as simple as RED
20RED
Arriving packet
AvgQsize gt Minth?
no
yes
Admit the new packet
AvgQsize gt Maxth?
no
yes
end
Drop the new packet
Admit packet with a probability p
end
end
21Random Sampling from Queue
UDP flow
- A randomly chosen packet more likely from the
unresponsive flow
- Adversary cant fool the system
22Comparison of Flow ID
- Compare the flow id with the incoming packet
- more acurate
- Reduce the chance of dropping packets from a
TCP-friendly flows.
23Dropping Mechanism
- Drop packets (both incoming and matching samples
) - More arrival -gt More Drop
- Give users a disincentive to send more
24Simulation Setup
D(1)
S(1)
10Mbps
S(2)
D(2)
10Mbps
m TCP
m TCP
Sources
Sinks
1Mbps
S(m)
D(m)
S(m1)
D(m1)
n UDP Sources
n UDP Sinks
S(mn)
D(mn)
25Network Setup Parameters
- 32 TCP flows, 1 UDP flow
- All TCPs 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
2632 TCP, 1 UDP (one sample)
2732 TCP, 5 UDP (5 samples)
28How Many Samples to Take?
Maxth
minth
avg
- Different samples for different Qlenavg
- samples ? when Qlenavg close to minth
- samples? when Qlenavg close to maxth
2932 TCP, 5 UDP (self-adjusting)
30Analytical Model
discards from the queue
permeable tube with leakage
31Fluid 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 ?t Li(t)?t /N -
dLi(t)/dt ?i Li(t) N Li(0) ?i (1-pi
) Li(D) ?i (1-2pi )
32Model vs Simulation- multiple TCPs and one UDP
1/(1e)
33Fluid Model - Multiple samples
- Multiple samples are chosen
Li(t)?t - Li(t ?t)?t M?i ?t Li(t)?t /N -
dLi(t)/dt M?i Li(t) N Li(0) ?i (1-pi
)M Li(D) ?i (1-pi )M - M?i pi
34Two Samples- multiple TCPs and one UDP
35Two Samples- multiple TCPs and two UDP
36What If We Use a Small Amount of State?
37AFD 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
38AFD Algorithm Details (Basic Case Equal Share)
Di Drop Probability for Class i
Arriving Packets
Qlen
1-Di
Qref
Class i
Di
39AFD Algorithm Details (General Case)
Di Drop Probability for Class i
Arriving Packets
Qlen
1-Di
Qref
Class i
Di
40Not Per-Flow State
Fraction of flows
- State requirement on the order of of
unresponsive flows - Elephant Traps (developed jointly Stanford and
Cisco)
41AFD 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
42Mixed Trafficwith Different Levels of
Unresponsiveness
43Drop Probabilities(note differential dropping)
44 Different Number of TCP Flows in Each Class
10 TCP Flows
Class 2
Class 1
5 TCP Flows
0
50
150
200
100
time
0
50
150
200
100
time
20 TCP Flows
15 TCP Flows
Class 4
Class 3
0
50
150
200
100
time
0
50
150
200
100
time
45 Different Class Throughput Comparison
46 Queue Length
47 Mfair
48AFD Implementation Issues
- Monitor Arrival Rate
- Determine Drop Probability
- Maximize Link Utilization
49Arrival 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
50Implementing 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)
51Implementing the Drop Function
- Drop levels are 1/32, 1/16, 3/32
- Suppose mi 100, mfair 62.0 gt Di 0.380,
52AFD - Summary
Fairness
RED
Simplicity
- Equal share is approximated in a wide variety of
settings - The state requirement is limited
53Summary
- Traditional Queue Management
- Drop Tail, Drop Front, Drop Random
- Problems lock-out, full queue, global
synchronization, bias against bursty traffic - Active Queue Management
- RED cant handle unresponsive flows
- CHOKe penalize unresponsive flows
- AFD provides approximate fairness with limited
states