Rich West (1999)
Scalable Scheduling Support for Loss and Delay Constrained Media - - PowerPoint PPT Presentation
Scalable Scheduling Support for Loss and Delay Constrained Media - - PowerPoint PPT Presentation
Scalable Scheduling Support for Loss and Delay Constrained Media Streams Richard West, Karsten Schwan & Christian Poellabauer Georgia Institute of Technology Rich West (1999) Introduction Real-Time media servers need to support 100s
Rich West (1999)
Introduction
■ Real-Time media servers need to support 100s (even
1000s) of clients with individual RT (QoS) constraints.
■ Need fast/efficient scheduling on such servers. ■ We describe Dynamic Window-Constrained
Scheduling (DWCS):
■ DWCS limits the number of late packets over finite
windows of arrivals requiring service.
■ Focus on a scalable implementation of DWCS. ■ Approximating DWCS trades execution speed for
service quality.
Rich West (1999)
DWCS Packet Scheduling
■ Two attributes per packet: ■ Deadline (max inter-packet gap). ■ Loss-tolerance, x/y.
■ x late/lost packets every y arrivals for service
from same stream.
■ At any time, all packets in the same stream: ■ Have the same current loss-tolerance. ■ Have deadlines offset by a fixed amount from
predecessors.
Rich West (1999)
DWCS - Conceptual View
Higher Priority = Lower Loss-Tolerance . . . Network Pipe EDF-ordered queues
Rich West (1999)
Heterogeneous Scheduling
Higher Priority = Lower Loss-Tolerance . . . Network Pipe EDF-ordered queues (Time-constrained traffic) 0 loss-tolerance queue Lowest loss-tolerance first (Non-time-constrained traffic) Compare first packet with packet at head of 0 loss-tolerance queue to see if schedulable.
Rich West (1999)
Pairwise Packet Ordering Table
Precedence amongs t pairs of packets
- Lowest loss-tolerance first
- Same non-zero loss-tolerance, order EDF
- Same non-zero loss-tolerance & deadlines,
- rder lowest loss-numerator first
- Zero loss-tolerance and denominators,
- rder EDF
- Zero loss-tolerance, order highest loss-
denominator first
- All other cases: first-come-first-serve
Rich West (1999)
Example: L1=1/2, L2=3/4, L3=6/8 D=1, Service Time (C)=1
1 s1 s2 s1 s 16 s1 s1 s1 s1 1 s s3 s2 s3 s2 s3 s2 s3 s1 s 1 s3 2 15 14 13 12 11 10 9 8 7 6 5 4 3 2 time, t 1/2(0), 1/1(1),1/2(2),1/1(3),1/2(4)... 3/4(0),2/3(1),2/2(2),1/1(3),3/4(4),2/3(5),2/2(6),1/1(7),3/4(8)... 6/8(0),5/7(1),4/6(2),3/5(3),3/4(4),2/3(5),1/2(6),0/1(7),6/8(8)...
Rich West (1999)
Example: L1=1/2, L2=1/2, C1=5, C2=3, D1=5, D2=3
9 10 11 12 13 14 15 16 1 8 time, t 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 time, t s1 s2 s2 s1 s1 s2 s2 s2 s1 s2 7 6 5 4 3 2 1/2(0),1/1(5),1/2(10),0/1(15),1/2(20),0/1(25),1/2(30)... 1/2(0),0/1(3),1/4(6),1/3(9),1/2(12),0/1(15),1/4(18), 1/3(21),1/2(24),0/1(27),1/2(30)...
Rich West (1999)
Loss-Tolerance Adjustment (A)
■ For stream i whose head packet is serviced before its
deadline:
■ if (yi’ > xi’) then yi’=yi’-1; ■ if (xi’=yi’=0) then xi’=xi; yi’=yi; ■ Where: ■ xi=Original loss-numerator for stream i ■ yi=Original loss-denominator for stream i ■ xi’=Current loss-numerator for stream i ■ yi’=Current loss-denominator for stream i
Rich West (1999)
Loss-Tolerance Adjustment (B)
■ For stream j whose head packet misses its deadline: ■ if (xj’ > 0) then
■ xj’=xj’-1; yj’=yj’-1; ■ if (xj’=yj’=0) then xj’=xj; yj’=yj;
■ else if (xj’=0) and (yj > 0) then
■ xj’=2xj-1; yj’=2yj+(yj’-1); (method 1) ■ xj’=xj; yj’=yj; (method 2) ■ if (xj > 0) then yj’=yj’+ (yj-xj)/xj; (method 3) ■ if (xj=0) then yj’=yj’+yj;
Rich West (1999)
DWCS Algorithm Outline
■ While TRUE: ■ Find stream i with highest priority (see Table) ■ Service packet at head of stream i ■ Adjust loss-tolerance for i according to (A) ■ Deadline(i) = Deadline(i) + Inter-Pkt Gap(i) ■ For each stream j missing its deadline:
■ While deadline is missed: ■ Adjust loss-tolerance for j according to (B) ■ Drop head packet of stream j if droppable ■ Deadline(j) = Deadline(j) + Inter-Pkt Gap(j)
Rich West (1999)
DWCS Implementation
for service from head packets in each stream. Select next packet (a) (b) Back of Queue To Back To Back Head Packet (Stream 1) Head Packet (Stream n) Deadline Heap Loss-Tolerance Heap Sz y S x S k S i S j S
Rich West (1999)
Missed Deadlines (D=500, C=1)
5000 10000 15000 20000 25000 30000 35000 40000 45000 50000 100 200 300 400 500 600 700 800 Number of Deadlines Missed Number of Streams FIFO 1/80 1/90 1/100 1/110 1/120 1/130 1/140 1/150 DWCS total
Rich West (1999)
Loss-Tolerance Violations (D=500, C=1)
2000 4000 6000 8000 10000 12000 100 200 300 400 500 600 700 800 Number of Loss-Tolerance Violations Number of Streams FIFO 1/80 1/90 1/100 1/110 1/120 1/130 1/140 1/150 DWCS total
Rich West (1999)
DWCS Spreads Losses
time, t 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 DWCS FIFO 1 2 3 4 5
Rich West (1999)
Packets Serviced Per Second
5 10 15 20 25 30 35 40 50 100 150 200 250 300 350 400 450 Service Rate (packets per second) Time (seconds) 480 streams 1/80 1/90 1/100 1/110 1/120 1/130 1/140 1/150
Rich West (1999)
Packets Serviced Per Second
5 10 15 20 25 100 200 300 400 500 600 700 Service Rate (packets per second) Time (seconds) 560 streams 1/80 1/90 1/100 1/110 1/120 1/130 1/140 1/150
Rich West (1999)
Scheduling Overhead
230 510 760 999 1307 1555 1914 57 63 76 87 122 157 208
200 400 600 800 1000 1200 1400 1600 1800 2000 120 240 360 480 600 720 840
Number of Streams Scheduling Overhead (uS)
Without heaps With heaps
Rich West (1999)
Synchronization Costs
12 27 539 666 804 1437 3639 3953 5836
1000 2000 3000 4000 5000 6000 2 4 6 8 12 16 22 24 32
Number of Streams Cost of Synchronization (uS)
Rich West (1999)
Approximation Overheads (D=200)
120 240 360 480 600 720 840 1 2 4 8 12 50 100 150 200 250 300 Scheduler Overhead (uS) Number of Streams Cycles Between Checking Deadlines
Rich West (1999)
Approximation Overheads (D=500)
120 240 360 480 600 720 840 1 2 4 8 12 50 100 150 200 250
Scheduler Overhead (uS) Number of Streams Cycles Between Checking Deadlines
Rich West (1999)
Deadlines Missed (D=200)
120 240 360 480 600 720 840 1 2 4 8 12 500000 1000000 1500000 2000000 2500000 3000000 3500000 4000000 4500000
Deadlines Missed Number of Streams Y
Rich West (1999)
Deadlines Missed (D=500)
120 240 360 480 600 720 840 1 2 4 8 12 100000 200000 300000 400000 500000 600000 700000 800000
Deadlines Missed Number of Streams Y
Rich West (1999)
Loss-Tolerance Violations (D=200)
120 240 360 480 600 720 840 1 2 4 8 12 5000 10000 15000 20000 25000 30000 35000 40000
Violations Number of Streams Y
Rich West (1999)
Loss-Tolerance Violations (D=500)
120 240 360 480 600 720 840 1 2 4 8 12 2000 4000 6000 8000 10000 12000 14000 16000
Violations Number of Streams Y
Rich West (1999)
DWCS Summary
■ Aimed at servicing packets with delay and loss-
constraints.
■ Attempts to service each stream so that at most x
packets are lost/late for every y packets requiring service.
■ DWCS minimizes the number of consecutive late
packets over any finite window of packets in a given stream.
■ Scheduling overhead can be reduced (and scalability
increased) by using appropriate data structures (heaps, circular queues) and approximation methods.
Rich West (1999)
DWCS - Current Work
■ DWCS is currently being adapted for use as a CPU
scheduler (using Linux), for hard real-time threads, so that (y-x) out of y deadlines can be met.
■ Leads to bounded service delay, and guaranteed
service in any finite window of service time.
■ Aim is to support coordinated thread/packet
scheduling.
Rich West (1999)