active queue management rong pan cisco system ee384y spring quarter 2006
Post on 15-Jan-2016
218 views
TRANSCRIPT
Active Queue Management
Rong PanCisco System
EE384ySpring Quarter 2006
2
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
3
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
4
TCP+Queue Management- A closed-loop control system
QueueManagement
_
N
C
_
q
Time Delay
+
+
-
1
W/R
p
0.5
+
5
Drop Tail- problems
• Lock out
• Full queue
• Bias against bursty traffic
• Global synchronization
6
Max Queue Length
Tail Drop Queue ManagementLock-Out
7
Tail Drop Queue Management Full-Queue
• Only drop packets when queue is full– long steady-state delay
8
Max Queue Length
Bias Against Bursty Traffic
9
Max Queue Length
Tail Drop Queue ManagementGlobal Synchronization
10
• Drop from front on full queue
• Drop at random on full queue
both solve the lock-out problem both have the full-queues problem
Alternative Queue Management Schemes
11
• Solve tail-drop 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
Active Queue ManagementGoals
12
Random Early Detection (RED)
yes
Drop the new packet
end
Admit packet with a probability p
end
AvgQsize > Maxth?
yes
Arriving packet
no
Admit the new packet
end
AvgQsize > Minth? no
13
RED Dropping Curve
minth maxth
0
Average Queue Size
Dro
p P
roba
bilit
y 1
maxp
14
Effectiveness of RED- Lock-Out & Global Synchronization
• Packets are randomly dropped
• Each flow has the same probability of being discarded
15
• Drop packets probabilistically in anticipation of congestion – not when queue is full
• Use qavg to decide packet dropping probability: allow instantaneous bursts
Effectiveness of RED- Full-Queue & Bias against bursty traffic
16
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
17
Bad News - unresponsive end hosts
tcp
tcpudp
udp
udp
tcp
tcp
Connectionless; Best-Effort
The Internet
18
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:
e.g. RED, FRED, SRED
19
FQ vs. RED
• Hard/Expensive to implement
• Isolation from non-adaptive flows
FQ
RED
• No isolation from non-adaptive flows
• Easy to implement
20
Active Queue Manament With Enhancement to Fairness
• Provide isolation from unresponsive flows• Be as simple as RED
FIFO
21
yes
Drop the new packet
end
Admit packet with a probability p
end
AvgQsize > Maxth?
yes
REDArriving packet
no
Admit the new packet
end
AvgQsize > Minth? no
yes
no
Drop both matched packets
end
Draw a packet atrandom from queue
Flow id same as the new packet id ?
yes
Drop the new packet
end
Admit packet with a probability p
end
noAvgQsize > Maxth?
no
CHOKe
22
Random Sampling from Queue
• A randomly chosen packet more likely from the
unresponsive flow
• Adversary can’t fool the system
UDP flow
23
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.
24
Dropping Mechanism
• Drop packets (both incoming and matching samples )
– More arrival -> More Drop
– Give users a disincentive to send more
25
1Mbps
10MbpsS(2)
S(m)
S(m+n)
m TCP Sources
S(m+1)
n UDP Sources
D(2)
D(m)
D(m+n)
m TCP Sinks
D(m+1)
n UDP Sinks
D(1)
10Mbps
Simulation SetupS(1)
26
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
27
32 TCP, 1 UDP (one sample)
0
200
400
600
800
1000
100 1000 10000UDP Arrival Rate (Kbps)
Thro
ughp
ut (K
bps)
UDP Throughput (RED)UDP Throughput (CHOKe)Avg. TCP Throughput (CHOKe)
23.0%
74.1%
99.6%
28
32 TCP, 5 UDP (5 samples)
0
300
600
900
1200
1500
100 1000 10000Total UDP Arrival Rate (Kbps)
Thro
ughp
ut (K
bps)
CHOKe(one sample):Total UDP ThroughputCHOKe(one sample):Total TCP ThroughputCHOKe with 5 samples: Total UDP ThroughputCHOKe with 5 samples: Total TCP Throughput
29
How Many Samples to Take?
minthMaxth
R1R2Rk
Different samples for different Qlenavg
– # samples when Qlenavg close to minth
– # samples when Qlenavg close to maxth
avg
30
6.6%
38.3%61.1%
89.7%
99.3%0
300
600
900
1200
100 1000 10000
Total UDP Arrival Rate (Kbps)
Th
rou
gh
pu
t (K
bp
s)
Total UDP Throughput
Total TCP Throughput
32 TCP, 5 UDP (self-adjusting)
31
Analytical Model
discards from the queue
permeable tube with leakage
32
Fluid Analysis
N: the total number of packets in the buffer Li(t): the survial 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 )
33
Model vs Simulation- multiple TCPs and one UDP
0
50
100
150
200
250
300
350
0.1 1 10Arrival Rate
Thr
ough
put
fluid model
CHOKe ns simulation
1/(1+e)
34
Fluid Model - Multiple samples
Li(t)t - Li(t +t)t = Mi t Li(t)t /N
- dLi(t)/dt = Mi Li(t) N
Li(0) = i (1-pi )M
Li(D) = i (1-pi )M - Mi pi
Multiple samples are chosen
35
Two Samples- multiple TCPs and one UDP
0
20
40
60
80
100
120
140
0 0.5 1 1.5 2UDP Arrival Rate(Mbps)
UD
P T
hrou
ghpu
t(K
bps)
NS SimulationFluid Model
36
Two Samples- multiple TCPs and two UDP
0
40
80
120
160
200
0 0.5 1 1.5 2
UDP Arrival Rate(Mbps)
UD
P T
hrou
ghpu
t(K
bps)
NS Simulation
Fluid Model
37
What If We Use a Small Amount of
State?
38
AFD: Goal
• Approximate equal bandwidth allocation– Not only AQM, approximate DRR scheduling
– Provide soft queues in addition to physical queues
• Keep the state requirement small
• Be simple to implement
39
AFD Algorithm: Details (Basic Case: Equal Share)
Di = Drop Probability for Class i
Qref
1-Di
Di
QlenArriving Packets
If Mi > Mfair : Di > 0 such that Mi (1-Di) = Mfair
If Mi Mfair : No Drop (Di = 0)
Mi = Arrival estimatefor Class i
(Bytes over interval Ts)
Mfair = Mfair - a (Qlen - Qref)+ b (Qlen_old - Qref)
Fair Share
Class i
40
AFD Algorithm: Details (General Case)
Di = Drop Probability for Class i
Qref
1-Di
Di
QlenArriving Packets
If Mi > Mfair : Di > 0 such that Mi (1-Di) = F(Mfair,Mini,Maxi,Wi, …)
If Mi F(Mfair,Mini,Maxi,Wi, …): No Drop (Di = 0)
Mi = Arrival estimatefor Class i
(Bytes over interval Ts)
Mfair = Mfair - a (Qlen - Qref)+ b (Qlen_old - Qref)
Fair Share
Class i
41
Not Per-Flow State
Fraction of flows
• State requirement on the order of # of unresponsive flows
42
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 the class)
• Observation and averaging of queue length as measure of congestion
• Functional definition of “fair share” based on fairness criterion
– perform probabilistic dropping (pre-enqueue) to drive arrival rate to equal desired departure rate
43
Mixed Trafficwith Different Levels of Unresponsiveness
0
100
200
300
400
500
RED CHOKe AFD
Thr
ough
put (
kbps
)
44
Drop Probabilities(note differential dropping)
0
0.05
0.1
0.15
0.2
0.25
0.3
RED CHOKe AFD
Dro
p P
roba
bili
ty
45
Different Number of TCP Flows in Each Class
Cla
ss 1
5 TCP Flows
0 50 150 200100 time
Cla
ss 2
10 TCP Flows
0 50 150 200100 time
Cla
ss 3
15 TCP Flows
0 50 150 200100 time
Cla
ss 4
20 TCP Flows
0 50 150 200100 time
46
Different Class Throughput Comparison
47
Queue Length
48
Mfair
49
AFD Implementation Issues
• Monitor Arrival Rate
• Determine Drop Probability
• Maximize Link Utilization
50
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
51
Implementing 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)
52
Implementing the Drop Function
• Suppose mi = 100, mfair = 62.0 => Di = 0.380,
0.0 1.0
Di
We choose the higher value using
binary search
0.375 0.406
• Drop levels are: 1/32, 1/16, 3/32…
53
FQ
RED
Simplicity
Fai
rnes
s
AFD - Summary
• Equal share is approximated in a wide variety of settings
• The state requirement is limited
CHOKeAFD
Ideal
54
Summary
• Traditional Queue Management – Drop Tail, Drop Front, Drop Random– Problems: lock-out, full queue, global
synchronization, bias against bursty traffic
• Active Queue Management– RED: can’t handle unresponsive flows– CHOKe: penalize unresponsive flows– AFD: provides approximate fairness with
limited states