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

packet scheduling weighted fair queueing wfq and virtual
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

1

Packet Scheduling: ( ) Weighted Fair Queueing (WFQ) and Virtual Clock (VC) and Virtual Clock (VC)

2/2/2017

1 WFQ and VC scheduling (Simon S. Lam)

slide-2
SLIDE 2

2

Fair Queueing server

R Flow 1 packets Flow 2 packets R Flow n packets

1.

Round robin service

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

2 WFQ and VC scheduling (Simon S. Lam)

slide-3
SLIDE 3

3

Weighted Fair Queueing (WFQ) server

w1 w2 R Flow 1 packets Flow 2 packets wn Flow n packets

 Each flow i is given a weight wi  Service rate received by flow i is  Service rate received by flow i is ri = R * wi / (w1 + w2 + ... + wn) where R is channel rate in bps where R is channel rate in bps

3 WFQ and VC scheduling (Simon S. Lam)

slide-4
SLIDE 4

4

Fluid Flow System (Processor Sharing) F 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

4 WFQ and VC scheduling (Simon S. Lam)

slide-5
SLIDE 5

5

Fluid Flow Example

Packet Size (bits) Packet inter-arrival time (ms) Arrival Rate (Kbps) Fl 1 1000 10 100

100 Kbps Flow 1 (w1 = 1)

Flow 1 1000 10 100 Flow 2 500 10 50

Flow 2 (w2 = 1)

Flow 1 arrivals

1 2 3 4 5

Note: Each number is one packet

Flow 2 arrivals Time Time

1 2 3 4 5 6

packet

1 2

3 1 2 4 3 4 5 5 6 Time Service in fluid flow 1 2 3 4 5 6 in fluid flow system Time (ms) 10 20 30 40 50 60 70 80

5 WFQ and VC scheduling (Simon S. Lam)

2/2/2017

slide-6
SLIDE 6

6

Packet-by-packet system Packet by packet system

 bit-by-bit round robin is not practical

1 2

3 1 2 4 3 4 5 5 6 Service in fluid flow system time (ms)

 Idea: Use finishing time of packet in fluid

system as priority for choosing the next

1 2 1 3 2 3 4 4 5 5 6

Packet-by-packet system

packet for service

system time (ms)

Note: Each number is one packet

6 WFQ and VC scheduling (Simon S. Lam)

slide-7
SLIDE 7

7

Packet finishing time

 Define

finishing time of packet j in flow f

( )

f

L j

finishing time of packet j in flow f

arrival time of packet j in flow f

length (in bits) of packet j in flow f

( )

f

s j

( )

f

A j ( ) L j

g ( ) p j f  Suppose

is a constant service rate (bits/sec) allocated to flow f

( ) j

f

r

allocated to flow f

Then the finishing time of packet j+1 in flow f

would be

( 1) ( 1) m ax{ ( ), ( 1)}

f f f f f

s j L j L j A j r + + = + +

7 WFQ and VC scheduling (Simon S. Lam)

slide-8
SLIDE 8

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

  • f packets change and will need to be
  • f packets change and will need to be

recomputed

8 WFQ and VC scheduling (Simon S. Lam)

slide-9
SLIDE 9

9

Solution: Virtual Time, V(t) Solut on V rtual T me, 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)

9 WFQ and VC scheduling (Simon S. Lam)

slide-10
SLIDE 10

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 2 (w2 = 1) Flow 1 (w1 = 1)

time time

1 2

3 1 2 4 3 4 5 5 6

C C/2

V(t)

(round #)

10 WFQ and VC scheduling (Simon S. Lam)

time t

slide-11
SLIDE 11

11

WFQ/PGPS scheduling

 Define

virtual time finishing time (in round number)

( )

f

P j

virtual time finishing time (in round number)

  • f packet j in flow f

arrival time of packet j in flow f

( )

f

A j ( ) P j

p j f

length (in bits) of packet j in flow f

weight (in bits) of flow f

( )

f

s j

( ) j

f

w

The priority of packet j+1 in flow f is its virtual

time finishing time

( 1)

f f f f

s j +

 Select the packet with smallest priority for

( 1) ( 1) m ax{ ( ), ( ( 1))}

f f f f

s j P j P j V A j w + + = + +

service

11 WFQ and VC scheduling (Simon S. Lam)

slide-12
SLIDE 12

12

PGPS delay relative to GPS PGPS delay relat ve to GPS

Let ( ) denote the departure time of packet

PGPS

L i i for packet-by-packet WFQ service Let ( ) denote the departure time of packet

GPS

L i i for bit-by-bit WFQ service

Parekh and Gallager (1993) proved

max

Parekh and Gallager (1993) proved ( ) ( )

PGPS GPS

L i L i v ≤ +

No notion of a reserved rate nor admission control that

max

where is maximum packet service time v

No notion of a reserved rate, nor admission control that bounds the number of flows

WFQ and VC scheduling (Simon S. Lam) 12

slide-13
SLIDE 13

13

Virtual Clock scheduling [L Zhang 1990] Virtual Clock scheduling [L. Zhang 1990]

 A flow f is allocated a reserved service

rate, rf, similar to TDM

 but unlike TDM, if a flow idles, its reserved

t b d b th fl rate can be used by other flows  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

t d t th fl guaranteed to other flows

WFQ and VC scheduling (Simon S. Lam) 13

slide-14
SLIDE 14

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

The new value of priority(f) is assigned to packet

( ) ( ) max{ ( ), ( )}

f

l p priority f priority f A p r ← +

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

slide-15
SLIDE 15

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

k t th k t m ll fl s ith th packet, the packet among all flows with the smallest virtual clock value is selected

 FCFS within a flow  FCFS within a flow  non-preemptive

WFQ and VC scheduling (Simon S. Lam) 15

slide-16
SLIDE 16

16

Properties of VC server

 Each flow f is allocated a reserved service

rate, rf

 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

WFQ and VC scheduling (Simon S. Lam) 16

No consideration of delay guarantee or bound in the original paper

slide-17
SLIDE 17

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

  • f ACM SIGCOMM, 1989.

 Paper is about fair queueing and flow control. Weights are

i d il h l i l di k not mentioned until the last page in a concluding remark.  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

Zh “Vi t l l k t ffi t l

 Lixia Zhang, “Virtual clock: a new traffic control

algorithm for packet-switching networks,” Proc. of ACM SIGCOMM, 1990.

WFQ and VC scheduling (Simon S. Lam) 17

slide-18
SLIDE 18

18

The end

WFQ and VC scheduling (Simon S. Lam) 18