Presentation is loading. Please wait.

Presentation is loading. Please wait.

March 29 Scheduling ?. What is Packet Scheduling? Decide when and what packet to send on output link 1 2 Scheduler flow 1 flow 2 flow n Buffer management.

Similar presentations


Presentation on theme: "March 29 Scheduling ?. What is Packet Scheduling? Decide when and what packet to send on output link 1 2 Scheduler flow 1 flow 2 flow n Buffer management."— Presentation transcript:

1 March 29 Scheduling ?

2 What is Packet Scheduling? Decide when and what packet to send on output link 1 2 Scheduler flow 1 flow 2 flow n Buffer management Select the next packet for transmission Arbitrator Classifier

3 Packet Scheduling ? Scheduler flow 1 flow 2 flow n Buffer management Packet storage decision (when to drop) Packet transmission decision (packet to send ) –desired transmission time ? QoS? smallest one first? –Schedulers differ in how they compute desired transmission times Controls the interaction among –Traffic in the same class –Traffic in the different QoS required classes –Traffic in the admin. purpose class

4 Characteristics of Scheduling algorithm Basic properties – How to isolate flow? to guarantee service to one flow independent of the behavior of other flow – How to support of excess traffic and fairness? Work conserving? If you send more than you are entitled to but resources are available, can you take advantage of it and if yes, how much – How complex it is? Computation complexity, management complexity – How efficient it is? # flows, packets?

5 Known scheduling ! FIFO, LIFO Fair Queueing – Min-Max – bit-by-bit round robin – Weighted bit-by-bit Fair Queueing (WFQ) – WFQ in a fluid flow system  Generalized Processor Sharing (GPS) Packetized FQ(PGPS)

6 First-Come First-Served Algorithm: – Packets are served in the order they arrive Departure time is arrival time plus time to empty buffer content First packet comes first packet out, – Properties Very simple to implement No flow isolation or bandwidth guarantees –One flow can hog the entire link if unconstrained Max delay is proportional to buffer size, not packet class

7 Priority Queuing Multiple FCFS queues, where high priority queues always transmit before lower priority ones – Departure time is time of arrival plus time to empty buffer content plus variable time (function of buffer content and arrivals in higher priority queues) – Class i is guaranteed to have better delay than class j for i<j – Lower priority classes can be starved – Remains simple to implement (for few classes)

8 Round-Robin Packets are classified and sent to “ n ” queues – Queues are serviced in order 0..n-1 Problems – Can ’ t offer bandwidth or delay guarantees – Packets can “ park ” in a queue, while empty queues are checked for servicing – Insensitive to packet size (inherently unfair) Scheduler flow 1 flow 2 flow n Buffer management

9 Weighted Round-Robin – Windowed Priority Queuing Each flow has its own queue and weight w i Packets sent to “ n ” queues, like Priority Queuing Server visits each queue in turn and transmits w i packets (bits) – Limited number of packets processed per queue per servicing round w i packets for each of the “ i ” queues w1w1 w2w2 w3w3 w4w4 w i = i Scheduler flow 1 flow 2 flow n Buffer management

10 FIFO Scheduling Serving in the Queueing system? server Time

11 FIFO Scheduling Is it fair? server Time Flow i #of served packets average Flow i Delay average FIFO favors the most greedy flowFIFO is hard to control the delay

12 Fair Queueing? Can provide (QOS) – Fairness: Make sure that a given flow gets enough transmission opportunities when it has packets waiting to be transmitted (is backlogged) – Delay: Ensure upper bound on the maximum (average) amount of time a packet can wait in the buffer – Jitter: Provide bound on the delay difference of consecutive packet transmissions (for the same flow) – Loss: is a function of Buffer management Distribution of excess bandwidth (E) across active sessions – Fair allocation gives each one of N active connections E/N+reserved BW

13 Example 1 1.1 Mb/s 10 Mb/s 100 Mb/s A B R1R1 C 0.55 Mb/s 0.55 Mb/s What is the “fair” allocation: (0.55Mb/s, 0.55Mb/s) or (1Mb/s, 0.1Mb/s)? e.g. an http flow with a given (IP SA, IP DA, TCP SP, TCP DP)

14 Example 2 1.1 Mb/s 10 Mb/s 100 Mb/s A B R1R1 D What is the “fair” allocation? 0.2 Mb/s C ? Mb/s ? Mb/s

15 Max-Min Fairness How can an Internet router “ allocate ” different rates to different flows? First, let ’ s see how a router can allocate the “same” rate to different flows … -> Max-Min Fairness Algorithm

16 Max-Min Fairness Algorithm A common way to allocate flows N flows share a link of rate C. Flow f wishes to send at rate W(f), and is allocated rate R(f). 1. Pick the flow, f, with the smallest requested rate. 2. If W(f) < C/N, then set R(f) = W(f). 3. If W(f) > C/N, then set R(f) = C/N. 4. Set N = N – 1. C = C – R(f). 5. If N>0 goto 1.

17 Max-Min fairness Example 1 Round 1: Since W(f 1 )<1.1/3(0.366), then Set R(f 1 ) = 0.2 Round 2: Since W(f 2 )>0.9/2(0.45), then Set R(f 2 ) = 0.9/2 = 0.45 Round 3: Since W(f 3 )>0.45/1(0.45), then Set R(f 4 ) = 0.45/1 = 0.45 The smallest flow in the round W(f 1 ) = 0.2 W(f 3 ) = 100 W(f 2 ) = 10 3 flows share a link of rate 1.1Mbps. Flow f wishes to send at rate W(f), and is allocated rate R(f). C=1.1Mbps, N=3 Sorted list 0.45 0.2 0.45 C=1.1

18 Max-Min Fairness Example 2 Another example Round 1: Since W(f 1 )<1/4(0.25), then Set R(f 1 ) = 0.1 Round 2: Since W(f 2 )>0.9/3(0.3), then Set R(f 2 ) = 0.9/3 = 0.3 Round 3: Since W(f 4 )>0.6/2(0.3), then Set R(f 4 ) = 0.6/2 = 0.3 Round 4: Since W(f 3 )>0.3/1(0.3), then Set R(f 3 ) = 0.3/1 = 0.3 The smallest flow in the round W(f 1 ) = 0.1 W(f 3 ) = 10 W(f 4 ) = 5 W(f 2 ) = 0.5 4 flows share a link of rate 1Mbps. Flow f wishes to send at rate W(f), and is allocated rate R(f). C=1Mbps, N=4 Sorted list 0.1 0.3 C=1

19 Max-Min Fairness Example 3 Another example The smallest flow in the round 3 flows share a link of rate 10Mbps. Flow f wishes to send at rate W(f), and is allocated rate R(f). C=10Mbps, N=3 Sorted list 8 6 2 4 4 2 C=10 Round 1: Since W(f 1 )<10/3(3.33), then Set R(f 1 ) = 2 Round 2: Since W(f 2 )>8/2(4), then Set R(f 2 ) = 8/2 = 4 Round 3: Since W(f 3 )>4/1(4), then Set R(f 4 ) = 4/1 = 4 R ( 8) = 4 R(6) = 4 R(2) = 2 Max-Min fairness

20 Bit-by-Bit Fair Queueing 1. Packets belonging to a flow are placed in a FIFO. This is called “ per-flow queueing ”. 2. FIFOs are scheduled one bit at a time, in a round-robin fashion. 3. This is called Bit-by-Bit Fair Queueing. Flow 1 Flow N ClassificationScheduling Bit-by-bit round robin Order of service … …f 1, f 2, f 3, f 4, f 5, f 6, …f N …, f 1,…

21 Weighted Bit-by-Bit Fair Queueing Likewise, flows can be allocated different rates by servicing a different number of bits for each flow during each round. 10 R(f 1 ) = 1 R(f 3 ) = 3 R1R1 C R(f 4 ) = 3 R(f 2 ) = 3 Order of service for the four queues: … f 1, f 2, f 2, f 2, f 3, f 3, f 3, f 4, f 4, f 4, f 1,… Also called “Generalized Processor Sharing (GPS)”

22 R(f): Fair Rate Computation Example Associate a weight w i with each flow i If link congested, compute R(f) such that 8 6 2 2 6 2 R(f i )= R(8) = 6 R(6) = 2 R(2) = 2 10 ( w 1 = 3) ( w 2 = 1) ( w 3 = 1) The smallest flow in the round Round 1: Since W(f 1 )<10/5(2), then Set R(f 1 ) = 2 Round 2: Since W(f 2 )>8/4(2), then Set R(f 2 ) = 8/4 = 2 Round 3: Since W(f 3 )>6/1(6), then Set R(f 4 ) = 6/1 = 6

23 Generalized Processor Share-fluid flow FQ 015210468 511111 Red session has packets backlogged between time 0 and 10 Other sessions have packets continuously backlogged flows Link=C 5C/  w i 1C/  w i

24 Generalized Processor Sharing A work conserving GPS is defined as where – w i – weight of flow i – W i (t 1, t 2 ) – total service received by flow i during [t 1, t 2 ) – W(t 1, t 2 ) – total service allocated to all flows during [t 1, t 2 ) – B(t) – number of flows backlogged

25 GPS Example OUT 6 14 ? ? ? 1 ( w 1 = 1/2) ( w 2 = 1/3) ( w 3 = 1/6) r 3 =1/3 r 2 =2/3 1/2 1/3 1/6 t dtdt2 w 2 = 1/3 w 1 = 1/2 w 3 = 1/6 IN dtdt2

26 GPS Example Three flows with weights/rates w 1 =1/2, w 2 =1/3, w 3 =1/6 Initially, only flows 2 and 3 are active (dt) Flows 1, 2, and 3 are ultimately active (dt2) OUT r 3 =1/3 t dt r 2 =2/3 1/2 1/3 1/6 dt2

27 27 Properties of GPS End-to-end delay bounds for guaranteed service [Parekh and Gallager ‘ 93] Fair allocation of bandwidth for best effort service [Demers et al. ‘ 89, Parekh and Gallager ‘ 92] Work-conserving for high link utilization

28 Summary of Fluid Flow Fair Queueing In a fluid flow system FQ reduces to bit-by-bit round robin among flows – Each flow receives R(f i ), where f i – flow arrival rate Weighted bit-by-bit Fair Queueing (WFQ) – associate a weight with each flow [Demers and etc. ’ 89] – In a fluid flow system it reduces to bit-by-bit round robin WFQ in a fluid flow system  Generalized Processor Sharing (GPS) [Parekh & Gallager ’ 92]

29 Packet vs. Fluid System GPS is defined in an idealized fluid flow model – Multiple queues can be serviced simultaneously – No non-preemption unit (preemptive) Real system are packet systems – One queue is served at any given time – Packet transmission is not preempted Goal – Define packet algorithms approximating the fluid system – Maintain most of the important properties

30 Standard techniques of approximating fluid GPS – Select packet that finishes first in GPS (assuming that there are no future arrivals) Important properties of GPS – Finishing order of packets currently in system independent of future arrivals Implementation based on virtual time – Assign virtual finish time to each packet upon arrival – Packets served in increasing order of virtual times Packet Approximation of Fluid System

31 Packetized GPS Algorithm Problem: We need to serve a whole packet at a time. Solution: 1. Determine what time a packet, p, would complete if we served flows bit-by-bit. Call this the packet ’ s finishing time, F(p). 2. Serve packets in the order of increasing finishing time. Theorem: Packet p will depart before F(p) + Tr max “Packetized Generalized Processor Sharing (PGPS)”

32 From Fluid to Packets Deviation : the fluid model (GPS) vs.(PGPS=WFQ) How to minimize it? – Cannot interrupt packet transmission once started Granularity in how transmission opportunities are allocated Inability to change decision even if higher priority (allocated rate) packets arrive Approach – Emulate the fluid system (GPS) as closely as possible Desired transmission time is finish transmission time in fluid system Select packet with smallest finish transmission time in the fluid system (assuming there would be no more arrivals after this time)

33 Approximating GPS with WFQ Fluid GPS system service order (ideal) 12354 6 10 02 468 PGPS (also called Weighted Fair Queueing) – select the first packet that finishes in GPS (service order) 12 345 678910 Virtual Finish time 1 2345 6,7,…

34 Packetized GPS (Weighted Fair Queueing) flow 1 flow 2. flow n C buffer GPS emulator that determines virtual departure times (VDT) of packets arrival times and packet lengths VDTs of packets Packets are transmitted in order of their VDTs

35 time Cumulative bytes A(t) D(t) R B(t) Deterministic analysis of a router queue FIFO delay, d(t) R A(t)D(t) Model of router buffer B(t) D(t): Service process A(t): Arrival process

36

37

38

39 Assume same packet size If arrived and queue is available enque Else drop At every tick, if queue is not empty deque and send it Example 25MBs computer and network Router 2MBs in steady state If IMB burst (40msec), AveRate = 2MB Rho = 2MB/s C = 1MB 25MB in 40msec Capacity 250KB Allow token for 2MB/sec

40 Want to speedup when large burst comes Token/DeltaT Save token in idle upto n Never discard packet-regulate host

41 Token capacity = 250KB Token arrives at the rate of 2MB/sec Assume token is full when 1MB burst arrives 40ms? NO C+rhoS= MS S = C/(M-rho) 250KB/(25MB/sec-2MB/sec) 250/(23)sec is about 11sec

42 Resource Resrvation Packet Scheduling And Integrated Service

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69 BGP – The Exterior Gateway Routing Protocol

70


Download ppt "March 29 Scheduling ?. What is Packet Scheduling? Decide when and what packet to send on output link 1 2 Scheduler flow 1 flow 2 flow n Buffer management."

Similar presentations


Ads by Google