packet scheduling weighted fair queueing wfq and virtual
play

Packet Scheduling: Weighted Fair Queueing (WFQ) ( ) and Virtual - PowerPoint PPT Presentation

Packet Scheduling: Weighted Fair Queueing (WFQ) ( ) and Virtual Clock (VC) and Virtual Clock (VC) WFQ and VC scheduling (Simon S. Lam) 1 2/2/2017 1 Fair Queueing server Flow 1 packets Flow 2 packets R R Flow n packets Round robin


  1. Packet Scheduling: Weighted Fair Queueing (WFQ) ( ) and Virtual Clock (VC) and Virtual Clock (VC) WFQ and VC scheduling (Simon S. Lam) 1 2/2/2017 1

  2. Fair Queueing server Flow 1 packets Flow 2 packets R R Flow n packets Round robin service 1. Packet-by-packet round robin Packet by packet round robin   2. Processor sharing Each flow receives a service rate of R/n Each flow receives a service rate of R/n ,   where R is channel rate in bps and n is the number of flows with non-empty queue WFQ and VC scheduling (Simon S. Lam) 2 2

  3. Weighted Fair Queueing (WFQ) server w 1 Flow 1 packets w 2 Flow 2 packets R Flow n packets w n  Each flow i is given a weight w i  Service rate received by flow i is  Service rate received by flow i is r i = R * w i / (w 1 + w 2 + ... + w n ) where R is channel rate in bps where R is channel rate in bps WFQ and VC scheduling (Simon S. Lam) 3 3

  4. F Fluid Flow System (Processor Sharing) F y m ( g)  Assume work-conserving server with no scheduling overhead scheduling overhead  Processor sharing can be implemented  Processor sharing can be implemented (conceptually) using bit-by-bit weighted round robin robin  During each round, each flow with data sends a number of bits proportional to the flow’s weight WFQ and VC scheduling (Simon S. Lam) 4 4

  5. Fluid Flow Example Packet Packet inter-arrival Arrival Size (bits) time (ms) Rate Flow 1 ( w 1 = 1) 100 Kbps (Kbps) Flow 1 Fl 1 1000 1000 10 10 100 100 Flow 2 ( w 2 = 1) Flow 2 500 10 50 Note: Each number is one Flow 1 arrivals 1 2 4 5 3 packet packet Time Flow 2 arrivals 1 2 3 4 5 6 Time Time Service 3 4 5 1 2 in fluid flow in fluid flow 1 1 2 2 3 3 4 4 5 5 6 6 Time (ms) system 0 10 20 30 40 50 60 70 80 WFQ and VC scheduling (Simon S. Lam) 2/2/2017 5 5

  6. Packet-by-packet system Packet by packet system  bit-by-bit round robin is not practical Service 3 4 5 1 2 in fluid flow 1 2 3 4 5 6 system time (ms)  Idea: Use finishing time of packet in fluid system as priority for choosing the next packet for service Packet-by-packet 1 2 1 3 2 3 4 4 5 5 6 system system time (ms) Note: Each number is one packet WFQ and VC scheduling (Simon S. Lam) 6 6

  7. Packet finishing time  Define finishing time of packet j in flow f finishing time of packet j in flow f ( ) ( ) f   L L j j arrival time of packet j in flow f ( ) f A j  length (in bits) of packet j in flow f g ( ) p ( ) ( ) f s j j j f   Suppose is a constant service rate (bits/sec) f r allocated to flow f allocated to flow f  Then the finishing time of packet j+1 in flow f would be ( 1) f s j + ( 1) m ax{ ( ), ( 1)} f f f L j L j A j + = + + f r WFQ and VC scheduling (Simon S. Lam) 7 7

  8. However In WFQ the service rate received by In WFQ, the service rate received by each flow changes whenever a new flow arrives flow arrives  When this happens, the finishing times of packets change and will need to be of packets change and will need to be recomputed WFQ and VC scheduling (Simon S. Lam) 8 8

  9. Solut on V rtual T me, V(t) Solution: Virtual Time, V(t)  V(t) is the round number in the bit-by-bit round robin system round robin system  Observation: When a packet of a new flow arrives an existing packet’s finishing time in arrives, an existing packet s finishing time in round number does not change  thus, finish order of existing packets does not , g p change  Instead of a packet’s finish time, compute the round # when a packet will finish (virtual time finishing time) WFQ and VC scheduling (Simon S. Lam) 9 9

  10. Virtual Time, V(t) (cont.) ( )  V(t) increases inversely proportionally to the sum of the weights of the backlogged flows Flow 1 (w = 1) Flow 1 (w 1 = 1) time Flow 2 (w 2 = 1) time 3 4 5 1 2 1 2 3 4 5 6 V(t) C/2 (round #) C time t WFQ and VC scheduling (Simon S. Lam) 10 10

  11. WFQ/PGPS scheduling  Define virtual time finishing time (in round number) virtual time finishing time (in round number) ( ) ( ) f   P P j j of packet j in flow f arrival time of packet j in flow f p ( ) ( ) f A j j j f  ( ) f length (in bits) of packet j in flow f s j  weight (in bits) of flow f f w   The priority of packet j+1 in flow f is its virtual time finishing time ( ( 1) 1) f s s j + j + ( 1) m ax{ ( ), ( ( 1))} f f f f f f P j P j V A j + = + + f w  Select the packet with smallest priority for service WFQ and VC scheduling (Simon S. Lam) 11 11

  12. PGPS delay relat ve to GPS PGPS delay relative to GPS Let ( ) denote the departure time of packet L i i PGPS for packet-by-packet WFQ service Let ( ) denote the departure time of packet L i i GPS for bit-by-bit WFQ service Parekh and Gallager (1993) proved Parekh and Gallager (1993) proved ( ) ( ) L i L i v ≤ + max PGPS GPS where is maximum packet service time v max No notion of a reserved rate, nor admission control that No notion of a reserved rate nor admission control that bounds the number of flows WFQ and VC scheduling (Simon S. Lam) 12 12

  13. Virtual Clock scheduling [L Zhang 1990] Virtual Clock scheduling [L. Zhang 1990]  A flow f is allocated a reserved service rate , r f , similar to TDM  but unlike TDM, if a flow idles, its reserved rate can be used by other flows t b d b th fl  Like TDM, however, there are “firewalls” between individual packet flows, i.e. between individual packet flows i e  A flow source that generates packets at a rate much higher than its reserved rate, may take mu g n , m y up idle capacity  but it cannot affect the throughput rates guaranteed to other flows t d t th fl WFQ and VC scheduling (Simon S. Lam) 13 13

  14. Virtual Clock server  Each flow f has a “virtual clock”, priority ( f ), which is zero initially and updated whenever a new packet in flow f arrives packet in flow f arrives  Let p denote a packet in flow f , with length l(p) p p , g (p) bits and arrival time, A(p) ( ≥ 0). Upon its arrival, ( ) ( ) l p l p ( ) max{ ( ), ( )} priority f priority f A p ← + f r The new value of priority ( f ) is assigned to packet The new value of priority ( f ) is assigned to packet p as its virtual clock value, denoted by P(p) WFQ and VC scheduling (Simon S. Lam) 14 14

  15. Virtual Clock server (cont.)  priority (f) holds the virtual clock value of the most recent packet arrival of flow f the most recent packet arrival of flow f  Virtual clock values of packets are determined by the sequence of packet arrival times and their service times  Whenever the server is ready for another packet, the packet among all flows with the k t th k t m ll fl s ith th smallest virtual clock value is selected  FCFS within a flow  FCFS within a flow  non-preemptive WFQ and VC scheduling (Simon S. Lam) 15 15

  16. Properties of VC server  Each flow f is allocated a reserved service rate, r f  The number of flows is limited (admission control)  A misbehaving flow source that generates packets at a rate higher than its reserved packets at a rate higher than its reserved rate, may take up idle capacity  but it cannot affect the throughput rates ff g p guaranteed to other flows No consideration of delay guarantee or bound in the original paper No consideration of delay guarantee or bound in the original paper WFQ and VC scheduling (Simon S. Lam) 16 16

  17. References References  A. Demers, S. Keshav, S. Shenker, “Analysis and simulation of a fair queueing algorithm” Proceedings simulation of a fair queueing algorithm Proceedings of ACM SIGCOMM , 1989.  Paper is about fair queueing and flow control. Weights are not mentioned until the last page in a concluding remark. i d il h l i l di k  A. Parekh and R. Gallager, “A generalized processor- sharing approach to flow control in integrated ar ng appr ac t f w c ntr n nt grat services networks: the single node case” IEEE/ACM Trans. on Networking , June 1993.  Li i  Lixia Zhang, “Virtual clock: a new traffic control Zh “Vi t l l k t ffi t l algorithm for packet-switching networks,” Proc. of ACM SIGCOMM , 1990. WFQ and VC scheduling (Simon S. Lam) 17 17

  18. The end WFQ and VC scheduling (Simon S. Lam) 18 18

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend