Title: Designing an Adaptive Scheduler for Latency Critical Traffic
1Designing an Adaptive Scheduler for Latency
Critical Traffic
- Hamed Khanmirza
- Advisor Dr. Nasser Yazdani
- Router Laboratory, ECE Dept. Univ. of Tehran
- 31st Shahrivar 1383 Sep. 21st 2004
2Outline
- QoS Definition
- Differentiated Service Architecture (DiffServ)
- Scheduling Mechanisms
- ADPQ
- Simulation Results
- Hardware Implementation
- Conclusion Future Works
- Publications
3Quality of Service (QoS)
- The capability to control traffic handling
mechanisms in the network such that the network
meets the service needs of certain applications
and users subject to network policies. - QoS Parameters
- Bandwidth
- Latency
- Jitter
- Loss
4QoS Components
- Congestion Avoidance (Queue Management)
- Try to inform the sources congestion conditions
- Resource Allocation
- When the congestion occurred which flow should
use how much of resources
5Outline
- QoS Definition
- Differentiated Architecture (DiffServ)
- Scheduling Mechanisms
- ADPQ
- Simulation Results
- Hardware Implementation
- Conclusion Future Works
- Publications
6DiffServ Architecture
- Ingress routers (Edge Routers)
- Perform per aggregate shaping or policing
- Mark packets with Code Points, each CP represent
a Class of Service (DSCP DiffServ Code Point) - Core routers
- Implement Per Hop Behavior (PHB) for each DSCP
- Process packets based on DSCP
DS-2
DS-1
Ingress
Egress
Ingress
Egress
Edge router
Core router
7Expedited Forwarding (EF)
- Provides the abstraction of a virtual Leased
Line between an ingress and an egress router - Network
- No loss
- low delay jitter
- User
- Send traffic based on SLA
- Excess traffic is delayed, and dropped when
buffer overflows
8Assured Forwarding (AF)
- Possible service
- strong assurance for traffic within profile
- Out-of-profile traffic will be marked as lower
class (i.e. BE) - Network
- lower loss rate than best-effort
- In case of congestion best-effort packets are
dropped first
9EF Traffic
- Due to timing constraints EF traffic has small
queues (2 10 packets). - Queue Manager has not significant role on EF
traffic - The most important role is Scheduler.
- Schedulers should be
- Simple
- accurate
10Outline
- QoS Definition
- QoS Standard Frameworks
- Scheduling Mechanisms
- ADPQ
- Simulation Results
- Hardware Implementation
- Conclusion Future Works
- Publications
11Strict Priority Queue (PQ)
- Sends from prioritized queue until it has packet
- Advantages
- Very Simple
- Minimum possible delay and jitter
- Exist in all NPs
- The most wide-spread method
- BUT
- Starvation
- Generating Burst
12PQ Behavior (Burst Generation)
13PQ Behavior (Burst Generation)
14Alternate Priority Queue (APQ)
- Alternates over high priority and low priority
queues - Advantages
- Reduces the threat of starvation
- Burst Length is always one!
- BUT
- Very fragile
- Limited range of rates and packet sizes
15Deficit Round Robin
DC 400
500
200
64
700
DC 500
v
100
100
100
100
DC 700
512
1024
Quantum 1500
16Deficit Round Robin
DC 400
500
200
64
700
DC 100
DC 700
v
512
1024
Quantum 1500
17Deficit Round Robin
DC 400
500
200
64
700
DC 100
DC 188
1024
Quantum 1500
18Deficit Round Robin
DC 1900
v
500
200
64
700
DC 0
DC 1688
1024
Quantum 1500
19DRR
- Is simple (O(1))
- Fair enough
- BUT
- For Sensitive traffic ?
- DRR
- Give high quality traffic strict priority over
others - Have the same problems as PQ!
20DRR
500
250
QLC 1000
QBE 1500
DC 400
500
200
64
700
DC 500
100
100
100
100
DC 700
512
1024
21DRR
- Advantages
- Reduces delay comparing with DRR
- Reduces burst comparing with PQ
- BUT
- Sensitive to transient bursts
- Hard to configure (QLC)
- Esp. for TCP traffic in the core!
- worst-case condition configuration
22Weighted Fair Queue (WFQ)
- Family of GPS-based (General Processor Sharing)
methods - In WFQ
- We keep Virtual Time as a service level
- When a packet arrives it is marked with two
labels - Si max (Ai , Fi-1)
- Fi Si ( Li / W)
- The packet with the smallest Fi is selected to be
sent
23WFQ
- Very bounded guarantees
- Have equivalent Jitter values as PQ
- BUT
- Have larger delay
- To achieve better results the EF queue should
have larger weights that approaches to PQ
behavior - Very complex
- Sorting
- Calculating Virtual Time
24Outline
- QoS Definition
- QoS Standard Frameworks
- Scheduling Mechanisms
- ADPQ
- Simulation Results
- Hardware Implementation
- Conclusion Future Works
- Publications
25Adaptive Priority Queue (ADPQ)
- ADPQ tries to provide
- Delay guarantee
- Bandwidth Guarantee
- No Starvation!
- And also, generate shortest burst
26ADPQ
- ADPQ sends K packets from High Priority (HP)
queue and one quantum from Low Priority (LP)
queues. - The amount of K is determined dynamically
- Parameters
- C Line Capacity
- D Max tolerable delay
- LEF Effective Packet Length
27ADPQ Theory
- Q(t) HP queue length (in packets)
- if Q(t) N K
- QBE LQ quantum
28ADPQ Theory
- ADPQ is conformant to RFC 3246
- RFC 3246 describes EF schedulers attributes
-
- Also, we know that EF traffic can not consume
more than
29ADPQ Algorithm
- How and When K is updated ?
- Instantaneous queue length
- Increasing K inappropriately
- Configured delay is violated
- Send all the packets, K is calculated for them
- Very fragile!
- Longer bursts in response of relatively long
arriving burst - Not aware of previous set of packets
30ADPQ Algorithm
- Send all the packets, K is calculated for them,
calculate new K in background and assign it when
K is increased to dangerous condition or all of
the previous set was sent (The first version of
ADPQ) - Using Instantaneous queue length arise some
problems ? use average length - Calculating K with every enqueue has processing
burden
31ADPQ Algorithm
- Averaging Period?
- Longer Periods
- We have to provide strict delay guarantee
- Short Periods
- It is the best solutions BUT how much short?
- Averaging Duration?
- Every n enqueue
- From When?
- Last m observations
32ADPQ Algorithm
Packet Length 1
Packet Length 2
Packet Length 3
- The calculated average is applied to threshold
array to find appropriate K (the index of the
array) - The second part indicates whether the size of the
queue has increased, decreased or remained
unchanged
33ADPQ Algorithm
- ADPQ holds packets (like a shaper) , it means do
not send packets as soon as their arriving (like
PQ) - Then, encountering next relatively long burst,
ADPQ have to increase K significantly at once - The generated bursts become worse than PQ!!
34ADPQ Algorithm
- Solution
- Anticipate the next arriving burst,
- BUT HOW?
- Determine traffic model (CBR, )
- Consider queue length change
- The m indicators give us a pattern. Based on the
patterns that shows how the queue is changed from
the previous observation increase K anticipatory.
35Pattern Codes
- //0 Unchanged - 1 Increased - 2 Decreased
- Category 1 000, 100
- Category 2 010, 001, 210
- Category 3 121, 211, 011, 110, 101, 201
- Category 4 111
- Category 0 Others
36Patterns
37Probability Calculation
- Decreasing probability with increasing K
- Considering equal thresholds
38ADPQ
- Advantages
- Easy configuration
- Very small burst based on delay requirement and
arriving traffic pattern - Guarantees rate
- Guarantees delay
- No starvation threat
- Complexity
- Complex operations are in enqueue part
- Dequeue part is still simple
39ADPQ Flowchart
Calculate Average and Find K
Calculate Probability
Enque count 4
New Enque
Find Patterns Category and its multiplicand
Calculate old and new Patterns
Calculate Final Probability
Increment K
Finish
Increment K
40Outline
- QoS Definition
- QoS Standard Frameworks
- Scheduling Mechanisms
- ADPQ
- Simulation Results
- Hardware Implementation
- Conclusion Future Works
- Publications
41Simulation Environment
- Simulated with NS2
- EF packet size 60 500
- ADPQ configured delay 3 ms
42Determining LEF
43LEF Effect
Maximum Burst length distribution
Maximum Delay
44Averaging Duration
Rate change with varying average length
45Averaging Duration
46UDP Traffic
Comparison of bandwidth usage for EF traffic
47UDP Traffic
48UDP Traffic
49Anticipation Effect
ADPQ treats similar to PQ with the same burst
length distribution, delay and rate
50TCP Traffic
51TCP Traffic
52TCP Traffic
53TCP Traffic
Number of Packet Drops (TCP)
Two more simulations are inside thesis.
54Outline
- QoS Definition
- QoS Standard Frameworks
- Scheduling Mechanisms
- ADPQ
- Simulation Results
- Hardware Implementation
- Conclusion Future Works
- Publications
55Hardware Implementation
56Increment K
57Increment K
58Category Finder (1st Pulse)
59Category Finder (2nd Pulse)
60Probability Calculation
- To Calculate
- ROM-Based approach
- Calculate all possible values
- Multiply all in 10 to achieve separate whole
numbers - Store them in a ROM
- Delay 3.96 ns / Area 98000 gates
- Very accurate
- Requires 10-bit LFSR and 10-bit comparator
61Probability Calculation
- Register-based
- Requires a 50-bit LFSR !
- A 50-bit comparator !
62Comparator
- Ordinary comparator
- Delay 6.17 ns
- Area 14000 gates
- New method
- Delay 2.97 ns
- Area 30000 gates
63Output Section
64Priority Encoder
- Ordinary PE
- Delay 3.31 ns
- Area 4800 g.
- Hierarchical PE
- Delay 1.96 ns
- Area 14000 g.
65Conclusion
- We introduced a new adaptive approach for
latency-critical traffic which - Can guarantee maximum delay
- Can guarantee a rate
- Can control output burst
- Starvation Free!
- Has easy configuration
- Relatively simple
- Has better results in face of UDP and TCP traffic
comparing to other scheduling methods
66Future Work
- Increasing performance of ADPQ against TCP
traffic - Extending ADPQ to multiple EF queues
- Designing of a general hardware framework for a
variety of scheduling methods
67Publications
- Hamed Khanmirza, Designing an Adaptive Scheduler
for Latency-Critical Traffic, M.Sc. Thesis - H.Khanmirza, S. Zarifzadeh, N.Yazdani,
Comparison of Alternate Priority Queuing for
Expedited Forwarding Per Hop Behavior, IST 2003,
Isfahan - Hamed Khanmirza, Sajjad Zarifzadeh, Naser
Yazdani, ADPQ Adaptive Priority Queuing,
APCC04 Beijing - Hamed Khanmirza, Sajjad Zarifzadeh, Naser
Yazdani, ADPQ Adaptive Priority Queue, A
Simulation-based Analysis, ICCC04 Beijing
68Publications
- Sajjad Zarifzadeh , Hamed Khanmirza, Naser
Yazdani, A Multipath Algorithm for Premium
Traffic Routing in DiffServ Networks, ICON04,
singapore - Sajjad Zarifzadeh , Hamed Khanmirza, Naser
Yazdani,A Distributed Multipath Algorithm for
Providing Bandwidth-Guaranteed Routing, APCC04,
Beijing - Hamed Khanmirza, Sajjad Zarifzadeh, Naser
Yazdani,E-ADPQ Enhanced Adaptive Priority
Queue, ready to submit for ICT05 - Hamed Khanmirza, Sajjad Zarifzadeh, Naser
Yazdani, ADPQ Adaptive Priority Queue,
Elsevier Journal
69- Thank you for your attention