280 likes | 475 Views
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.
E N D
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 • 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
GPS(Cont’) • Observation : • Guaranteed service rate for session j whenever it becomes backlogged • Another View • Weighted round robin with infinitely small service amount
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
Virtual Start Time Virtual Finish Time Virtual Time Implementation of WFQ PGPS(Cont’)
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
Result comparison(GPS, WFQ) GPS 0 3 5.5 6 7 4 WFQ 0 1 3 5 7
A 3.5 B,C 3 V(t) 2.5 Virtual Time F(0) = Max(0,0) + 2 = 2 2 1.5 F(0) = Max(0,0) + 1 = 1 1 0.5 Slope = C / weighted sum of backlogged flows = 1/3 0 1 2 3 4 5 6 7 8 Real Time(At time 0)
A 3.5 B,C 3 V(t) 2.5 Virtual Time 2 1.5 Flow A is unbacklogged in WFQ at time 1 1 Flow A is unbacklogged in GPS at time 3 0.5 0 1 2 3 4 5 6 7 8 Real Time(AT time 3)
2nd packet of size 2 arrives A 3.5 F(4) = Max(1.5,1) + 2 = 3.5 B,C 3 V(t) 2.5 Virtual Time 2 1.5 Slope = 1/2 1 0.5 0 1 2 3 4 5 6 7 8 Real Time(At time 4)
A 3.5 B,C 3 V(t) 2.5 Virtual Time Flow B or C is unbacklogged in GPS at time 5.5 2 Slope = 1/3 1.5 1 0.5 0 1 2 3 4 5 6 7 8 Real Time(At time 5.5)
A 3.5 B,C 3 V(t) Slope = 1 2.5 Virtual Time 2 1.5 1 0.5 0 1 2 3 4 5 6 7 8 Real Time(At time 7)
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
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
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
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
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
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
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
Fairness of WF2Q • Cannot fall behind GPS by one packet, however, can not fall ahead GPS by one packet • This means
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