EE384Y: Packet Switch Architectures Part II Load-balanced Switches
Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.
-
date post
15-Jan-2016 -
Category
Documents
-
view
218 -
download
0
Transcript of Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.
![Page 1: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/1.jpg)
Active Queue Management
Rong PanCisco System
EE384ySpring Quarter 2006
![Page 2: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/2.jpg)
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
![Page 3: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/3.jpg)
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
![Page 4: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/4.jpg)
4
TCP+Queue Management- A closed-loop control system
QueueManagement
_
N
C
_
q
Time Delay
+
+
-
1
W/R
p
0.5
+
![Page 5: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/5.jpg)
5
Drop Tail- problems
• Lock out
• Full queue
• Bias against bursty traffic
• Global synchronization
![Page 6: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/6.jpg)
6
Max Queue Length
Tail Drop Queue ManagementLock-Out
![Page 7: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/7.jpg)
7
Tail Drop Queue Management Full-Queue
• Only drop packets when queue is full– long steady-state delay
![Page 8: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/8.jpg)
8
Max Queue Length
Bias Against Bursty Traffic
![Page 9: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/9.jpg)
9
Max Queue Length
Tail Drop Queue ManagementGlobal Synchronization
![Page 10: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/10.jpg)
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
![Page 11: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/11.jpg)
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
![Page 12: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/12.jpg)
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
![Page 13: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/13.jpg)
13
RED Dropping Curve
minth maxth
0
Average Queue Size
Dro
p P
roba
bilit
y 1
maxp
![Page 14: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/14.jpg)
14
Effectiveness of RED- Lock-Out & Global Synchronization
• Packets are randomly dropped
• Each flow has the same probability of being discarded
![Page 15: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/15.jpg)
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
![Page 16: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/16.jpg)
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
![Page 17: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/17.jpg)
17
Bad News - unresponsive end hosts
tcp
tcpudp
udp
udp
tcp
tcp
Connectionless; Best-Effort
The Internet
![Page 18: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/18.jpg)
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
![Page 19: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/19.jpg)
19
FQ vs. RED
• Hard/Expensive to implement
• Isolation from non-adaptive flows
FQ
RED
• No isolation from non-adaptive flows
• Easy to implement
![Page 20: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/20.jpg)
20
Active Queue Manament With Enhancement to Fairness
• Provide isolation from unresponsive flows• Be as simple as RED
FIFO
![Page 21: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/21.jpg)
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
![Page 22: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/22.jpg)
22
Random Sampling from Queue
• A randomly chosen packet more likely from the
unresponsive flow
• Adversary can’t fool the system
UDP flow
![Page 23: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/23.jpg)
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.
![Page 24: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/24.jpg)
24
Dropping Mechanism
• Drop packets (both incoming and matching samples )
– More arrival -> More Drop
– Give users a disincentive to send more
![Page 25: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/25.jpg)
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)
![Page 26: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/26.jpg)
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
![Page 27: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/27.jpg)
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%
![Page 28: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/28.jpg)
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
![Page 29: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/29.jpg)
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
![Page 30: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/30.jpg)
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)
![Page 31: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/31.jpg)
31
Analytical Model
discards from the queue
permeable tube with leakage
![Page 32: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/32.jpg)
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 )
![Page 33: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/33.jpg)
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)
![Page 34: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/34.jpg)
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
![Page 35: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/35.jpg)
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
![Page 36: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/36.jpg)
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
![Page 37: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/37.jpg)
37
What If We Use a Small Amount of
State?
![Page 38: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/38.jpg)
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
![Page 39: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/39.jpg)
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
![Page 40: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/40.jpg)
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
![Page 41: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/41.jpg)
41
Not Per-Flow State
Fraction of flows
• State requirement on the order of # of unresponsive flows
![Page 42: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/42.jpg)
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
![Page 43: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/43.jpg)
43
Mixed Trafficwith Different Levels of Unresponsiveness
0
100
200
300
400
500
RED CHOKe AFD
Thr
ough
put (
kbps
)
![Page 44: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/44.jpg)
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
![Page 45: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/45.jpg)
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
![Page 46: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/46.jpg)
46
Different Class Throughput Comparison
![Page 47: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/47.jpg)
47
Queue Length
![Page 48: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/48.jpg)
48
Mfair
![Page 49: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/49.jpg)
49
AFD Implementation Issues
• Monitor Arrival Rate
• Determine Drop Probability
• Maximize Link Utilization
![Page 50: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/50.jpg)
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
![Page 51: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/51.jpg)
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)
![Page 52: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/52.jpg)
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…
![Page 53: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/53.jpg)
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
![Page 54: Active Queue Management Rong Pan Cisco System EE384y Spring Quarter 2006.](https://reader036.fdocuments.us/reader036/viewer/2022062322/56649d5f5503460f94a3f51d/html5/thumbnails/54.jpg)
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