packet scheduling: scfq, stfq, wf2q

27
Packet Scheduling: SCFQ, STFQ, WF2Q Yongho Seok

Upload: tess

Post on 13-Jan-2016

57 views

Category:

Documents


5 download

DESCRIPTION

Packet Scheduling: SCFQ, STFQ, WF2Q. Yongho Seok. Contents. Review: GPS, PGPS SCFQ( Self-clocked fair queuing ) STFQ( Start time fair queuing ) WF2Q( Worst-case fair weighted fair queuing ) Conclusion. GPS. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Packet Scheduling: SCFQ, STFQ, WF2Q

Packet Scheduling:SCFQ, STFQ, WF2Q

Yongho Seok

Page 2: Packet Scheduling: SCFQ, STFQ, WF2Q

Contents

• Review: GPS, PGPS

• SCFQ( Self-clocked fair queuing )

• STFQ( Start time fair queuing )

• WF2Q( Worst-case fair weighted fair queuing )

• Conclusion

Page 3: Packet Scheduling: SCFQ, STFQ, WF2Q

GPS

• An idealized policy that can split bandwidth among multiple sessions simultaneously– Each session I has a queue and a weight – At time t, GPS serves all non-empty queues

simultaneously in proportion to

– Property

i

( )

( ) ii

jj B t

r t

Page 4: Packet Scheduling: SCFQ, STFQ, WF2Q

GPS(Cont’)

• Observation :– Guaranteed service rate for session j whenever it becomes b

acklogged

• Another View– Weighted round robin with infinitely small service amount

Page 5: Packet Scheduling: SCFQ, STFQ, WF2Q

PGPS

• Intuition– Compute the time a packet would complete service

had we been serving packets with a GPS server, then serve packets in order of these finishing times

– emulates GPS “on the side” and uses the results of this simulation to determine service order

• Three virtual times– Not real time, but time for representing the amount

of service– Virtual Star time, Virtual Finish time : each flow– Virtual System time : system-wide time

Page 6: Packet Scheduling: SCFQ, STFQ, WF2Q

PGPS(Cont’)

1( ) max{ ( ), ( )}i iS t V t F t

( ) ( )k

ii i

i

LF t S t

0)0( V

1 1( ) ( )

j

j ji

i B

CV t V t

Virtual Start Time

Virtual Finish Time

Virtual Time Implementation of WFQ

,...3,2,1 jtt jj

Page 7: Packet Scheduling: SCFQ, STFQ, WF2Q

PGPS(Cont’)

1 2 2 1

( ) ( )

1 2 2 1

( )

1 2 1 2

( )

1 2

( , ) ( ) ( )( )

( , ) ( ) ( )

( , ) ( , )

( , ) ,

i i ii

i i j jj B t j B t

k k

k k jj B t

j k

j k jj B t

ki i

S t t r t t t CC r t

S t t r t t t C

S t t S t t C

If C=1 and S t t L then

This packet finish service af

ki

i

Lvirtual t time er

Page 8: Packet Scheduling: SCFQ, STFQ, WF2Q

WFQ : Scheduling Example

• Situation– Three sessions : A, B, and C– Time 0 : packets of size 1(A), 2(B), and 2(C) arrives– Time 4 : a packet of size 2(A) arrives

• Assumption– Weight are all same – Link Capacity C = 1

Page 9: Packet Scheduling: SCFQ, STFQ, WF2Q

Result comparison(GPS, WFQ)

0 3 4 5.5 6 7

0 1 3 5 7

GPS

WFQ

Page 10: Packet Scheduling: SCFQ, STFQ, WF2Q

1 2 3 4 5 6 7 80

0.5

1

1.5

2

2.5

3

3.5AB,CV(t)

Slope = C / weighted sum of backlogged flows = 1/3

Real Time(At time 0)

Virtual Tim

e F(0) = Max(0,0) + 2= 2

F(0) = Max(0,0) + 1= 1

Page 11: Packet Scheduling: SCFQ, STFQ, WF2Q

1 2 3 4 5 6 7 80

0.5

1

1.5

2

2.5

3

3.5AB,CV(t)

Flow A is unbacklogged in GPS at time 3

Flow A is unbacklogged in WFQ at time 1

Virtual Tim

e

Real Time(AT time 3)

Page 12: Packet Scheduling: SCFQ, STFQ, WF2Q

1 2 3 4 5 6 7 80

0.5

1

1.5

2

2.5

3

3.5AB,CV(t)

Slope = 1/2

2nd packet of size 2 arrives

F(4) = Max(1.5,1) + 2= 3.5

Virtual Tim

e

Real Time(At time 4)

Page 13: Packet Scheduling: SCFQ, STFQ, WF2Q

1 2 3 4 5 6 7 80

0.5

1

1.5

2

2.5

3

3.5AB,CV(t)

Slope = 1/3

Flow B or C is unbacklogged in GPS at time 5.5

Virtual Tim

e

Real Time(At time 5.5)

Page 14: Packet Scheduling: SCFQ, STFQ, WF2Q

1 2 3 4 5 6 7 80

0.5

1

1.5

2

2.5

3

3.5AB,CV(t)

Slope = 1Virtual Tim

e

Real Time(At time 7)

Page 15: Packet Scheduling: SCFQ, STFQ, WF2Q

Fairness of WFQ

• The difference between GPS and WFQ• Cannot fall behind GPS by one packet• One Packet difference means

• Problem– Cannot fall behind GPS by one packet, however, can fall ahead

GPS by infinite amount– Motivation of WF2Q

Page 16: Packet Scheduling: SCFQ, STFQ, WF2Q

Self-Clocked Fair Queuing (SCFQ)

• Same as WFQ except

• CF : the virtual finish time of the packet currently in service

• Easier to implement than WFQ

1CF( ) max{ , ( )}i iS t F t

( ) ( )k

ii i

i

LF t S t

Page 17: Packet Scheduling: SCFQ, STFQ, WF2Q

Relative Fairness & Absolute Fairness

• The service rate allocated to connection I at the kth switch on its path from source to its destination

• Relative Fairness

• Absolute Fairness

( , ) ( )( , )

( , )

i k r kg i k

j k

( , , ) ( , , )| |

( ) ( )

S i t S j tRFB

g i g j

( , , ) ( , , )| |

( ) ( )

S i t G j tAFB

g i g i

Page 18: Packet Scheduling: SCFQ, STFQ, WF2Q

Fairness of SCFQ

• The author has shown that the relative fairness bound for SCFQ is

• But, the absolute fairness bounded for SCFQ is currently unknown

• Although the SCFQ round number update rule is easy to implement, it can be unfair over short term scales

max max( ) ( )

( ) ( )

P i P jRFB

g i g j

Page 19: Packet Scheduling: SCFQ, STFQ, WF2Q

Fairness of SCFQ(Cont’)

• Worst-case latency for SCFQ is

compared to

for WFQ • STFQ improve a large worst case delay and short-term

unfairness

max max( )( 1)

( )

P i PN

g i r

max max( )

( )

P i P

g i r

Page 20: Packet Scheduling: SCFQ, STFQ, WF2Q

Start-time Fair Queuing (STFQ)

Same as WFQ except

SF : the virtual start time of the packet currently in service

Serves the packet having smallest virtual start time

Easier to implement than WFQ Note

1SF( ) max{ , ( )}i iS t F t

( ) ( )k

ii i

i

LF t S t

Page 21: Packet Scheduling: SCFQ, STFQ, WF2Q

Worst-case Fair Weighted Fair Queuing (WF2Q)

• Conceptually,– S(t) : the total amount of service received by flow I– V(t) : the total amount of service , which would be

received in GPS

• WF2Q algorithm– WFQ scheduling + eligibility test– eligible test

• Among packets that have started service under GPS, pick the packet having the smallest virtual finish time

( ) ( )iV t S t

Page 22: Packet Scheduling: SCFQ, STFQ, WF2Q

WF2Q : Scheduling Example

Page 23: Packet Scheduling: SCFQ, STFQ, WF2Q
Page 24: Packet Scheduling: SCFQ, STFQ, WF2Q
Page 25: Packet Scheduling: SCFQ, STFQ, WF2Q
Page 26: Packet Scheduling: SCFQ, STFQ, WF2Q

Fairness of WF2Q

• Cannot fall behind GPS by one packet, however, can not fall ahead GPS by one packet

• This means

Page 27: Packet Scheduling: SCFQ, STFQ, WF2Q

Conclusion

• WFQ provides fairness and end-to-end delay bound, but has a heavy implementation complexity

• SCFQ, STFQ, WF2Q are easy to implement

• Issues– Delay & bandwidth requirement is coupled

1max, max

1 1,i

K Kii

ik mi k m

P PD

r r r