SRR:AnO(1)Time-ComplexityPacketSchedulerforFlowsinMultiservicePacketNetwork
Ghuanxiong GuoIEEE/ACMTransactiononNetworking,Vol.12,No.6,December2004
Presenters:Taeju Park,Yibo Pi
Introduction• DifferenttypesofservicesontheInternet:• Delayinsensitive:email• Delaysensitive:videoandaudioconferencing
• Resourceisolationisneededtoprovidequalityofservice(QoS)• Flowsareservedbasedontheirrequirements
• PacketScheduler• Decidewhichpackettobetransmittedwhentheoutputlinkisidle
Schedulerw1
w2
w3
Fairness:thenumberofbitsservedforeachflowisproportionaltotheirweights.
IntrotoFairQueueing
Firstinfirstout(FIFO):noisolationamongdifferentflows
12 2 2Scheduler
Schedulerw1
w2
w3
Bit-by-bitroundrobin
round1round2
round3
Ineachround,Flow1:w1 bitsFlow2:w2 bitsFlow3:w3 bits
GeneralizedProcessorSharing(GPS)
GPS:idealfairness,butnotpracticaltouse
PacketizedQueueingSchemes
• Weightedfairqueueing(WFQ)• Deficitroundrobin(DRR)
120
150
w1 =1
w2 =2
w3 =4
DeficitcounterQuantum=100100
0
0
100 200
50100150 100
PacketizedQueueingSchemes
• Weightedfairqueueing(WFQ)• Deficitroundrobin(DRR)
120w1 =1
w2 =2
w3 =4
DeficitcounterQuantum=100100
50
0
100
50100150 100 400
PacketizedQueueingSchemes• Weightedfairqueueing(WFQ)• Deficitroundrobin(DRR)
120w1 =1
w2 =2
w3 =4
DeficitcounterQuantum=100100
50
0
100
ProblemsofDRR:1)bursty outputand2)short-termunfairness
Sequenceofservice:flow1,flow2,flow3,flow3,flow3,flow3
4packets
HowtoimproveDRR?
120
150
150
w1 =1
w2 =2
w3 =4
DeficitcounterQuantum=100
0
0
100
100150
0
Sequenceofservice:flow1,flow2,flow3,flow3,flow3,flow3
sequenceofservice:flow1,flow2,flow3,flow3,flow2,flow3,flow3
0
HowtoimproveDRR?
120
150
150
w1 =1
w2 =2
w3 =4
DeficitcounterQuantum=100
0
0
100
100150
0
Sequenceofservice:flow1,flow2,flow3,flow3,flow3,flow3
sequenceofservice:flow1,flow2,flow3,flow3,flow2,flow3,flow3
100
HowtoimproveDRR?
120
150
150
w1 =1
w2 =2
w3 =4
DeficitcounterQuantum=100
0
0
100
100150
100
Sequenceofservice:flow1,flow2,flow3,flow3,flow3,flow3
sequenceofservice:flow1,flow2,flow3,flow3,flow2,flow3,flow3
100
HowtoimproveDRR?
120
150
150
w1 =1
w2 =2
w3 =4
DeficitcounterQuantum=100
0
100
100
100150
100
Sequenceofservice:flow1,flow2,flow3,flow3,flow3,flow3
sequenceofservice:flow1,flow2,flow3,flow3,flow2,flow3,flow3
100
HowtoimproveDRR
120
150
150
w1 =1
w2 =2
w3 =4
DeficitcounterQuantum=100100
100
200
100
100150
Sequenceofservice:flow1,flow2,flow3,flow3,flow3,flow3
sequenceofservice:flow1,flow2,flow3,flow3,flow2,flow3,flow3
HowtoimproveDRR
120
150
w1 =1
w2 =2
w3 =4
DeficitcounterQuantum=100100
100
50
100
100150
Sequenceofservice:flow1,flow2,flow3,flow3,flow3,flow3
sequenceofservice:flow1,flow2,flow3,flow3,flow2,flow3,flow3
HowtoimproveDRR
120
150
w1 =1
w2 =2
w3 =4
DeficitcounterQuantum=100100
200
50
100
100150
Sequenceofservice:flow1,flow2,flow3,flow3,flow3,flow3
sequenceofservice:flow1,flow2,flow3,flow3,flow2, flow3,flow3
HowtoimproveDRR
120w1 =1
w2 =2
w3 =4
DeficitcounterQuantum=100100
50
50
100
100150
Sequenceofservice:flow1,flow2,flow3,flow3,flow3,flow3
sequenceofservice:flow1,flow2,flow3,flow3,flow2,flow3,flow3
HowtoimproveDRR
120w1 =1
w2 =2
w3 =4
DeficitcounterQuantum=100100
50
150
100
100150
Sequenceofservice:flow1,flow2,flow3,flow3,flow3,flow3
sequenceofservice:flow1,flow2,flow3,flow3,flow2,flow3,flow3
HowtoimproveDRR
120w1 =1
w2 =2
w3 =4
DeficitcounterQuantum=100100
50
50
100
150
Sequenceofservice:flow1,flow2,flow3,flow3,flow3,flow3
sequenceofservice:flow1,flow2,flow3,flow3,flow2,flow3, flow3
HowtoimproveDRR
120w1 =1
w2 =2
w3 =4
DeficitcounterQuantum=100100
50
150
100
150
Sequenceofservice:flow1,flow2,flow3,flow3,flow3,flow3
sequenceofservice:flow1,flow2,flow3,flow3,flow2,flow3,flow3
HowtoimproveDRR?
120w1 =1
w2 =2
w3 =4
DeficitcounterQuantum=100100
50
0
100
sequenceofservice:flow1,flow2,flow3,flow3,flow2,flow3,flow3
#serviceofflow1:1#serviceofflow2:2#serviceofflow4:4 4consecutivepacketsfromflow3à 2consecutivepacketsfromflow3
2packets 2packets1packet
ThedesigngoalofSmoothedRoundRobin
WeightedFairQueueingPro:Short-termfairnessCon:highcomplexityO(#ofactiveflow)
RoundrobinPro:lowcomplexityO(1)Con:short-termunfairness
CombinetheprosofWFQandroundrobin
SmoothedRoundrobinShort-termfairness+lowcomplexityO(1)
WeightSpreadSequence(WSS)
• WSSisaspeciallydesignedsequencethatdistributestheoutputtrafficofeachflowevenly.• AsetofWSSsisdefinedrecursivelyasfollows:• !" = 1
• !% = &'
%= !
%(", *, !
%("
• Totalnumberoftermsin*+, WSSis-./% = 2%− 1
• WSSExample• !2 = 1,2,1,3,1,2,1
• !4 = {1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1}
• -./4 = 24− 1 = 31
!9
!9
*
WeightMatrix
• Eachflowisassignedaweightinproportiontoitsreservedrate.• (:" =64kb/s,:9 =256kb/s,:2 =512kb/s,:; =192kb/s)=>(<" =1,<9 =4,<2 =8,<; =3)
• Weightof=-><? isencodedasbinarynumber 4 = 1009 inweightmatrix
Thenumberofcolumns=orderofWSS
AB =
AC"
⋮
ACE
=
&",(%(") ⋯ &",I
⋮ ⋱ ⋮
&E,(%(") ⋯ &E,I
Row:weightvectorofaflowIfweightis10,then[1010]wherek=4
Columnnumber
SmoothedRoundRobinScheduler
• Fourflowswithfixedpacketsize(=", =9, =2, =;) withcorrespondingweights(<", <9, <2, <;)• <" = 1,<9 = 4,<2 = 8,<; = 3
• CorrespondingWSS,!; = {1,2,1,3,1,2,1,4,1,2,1,3,1,2,1}
• BasicIdeaofSmoothedRoundRobin(SRR)Scheduler1. scanWSSsequencetermbyterm2. WhenthevalueofthetermisL,M>-NO/%(' oftheWMischosen.3. Inthecolumn,theschedulerscanthetermsfromtoptobottom.4. Ifthetermis1,theschedulerservethecorrespondingflow.
M2 M9 M" MI
scan
scan
• Fourflowswithfixedpacketsize(=", =9, =2, =;) withcorrespondingweights(<", <9, <2, <;)• <" = 1,<9 = 4,<2 = 8,<; = 3
• CorrespondingWSS,!; = {1,2,1,3,1,2,1,4,1,2,1,3,1,2,1}
• Threeasynchronousaction• Schedule,Del_flow,Add_flow
SmoothedRoundRobin
100
150
w1 =1
w2 =4
w3 =8
PQRS =100
0
0
0
100
50100150 100
w4 =3 50100 1000
Deficitcounter
Scheduler
• Fourflowswithfixedpacketsize(=", =9, =2, =;) withcorrespondingweights(<", <9, <2, <;)• <" = 1,<9 = 4,<2 = 8,<; = 3
• CorrespondingWSS,!; = {1,2,1,3,1,2,1,4,1,2,1,3,1,2,1}
• Threeasynchronousaction• Schedule,Del_flow,Add_flow
SmoothedRoundRobin
100
150
w1 =1
w2 =4
w3 =8
PQRS =100
0
0
100
100
50100150 100
w4 =3 50100 1000
Deficitcounter
Scheduler
• Fourflowswithfixedpacketsize(=", =9, =2, =;) withcorrespondingweights(<", <9, <2, <;)• <" = 1,<9 = 4,<2 = 8,<; = 3
• CorrespondingWSS,!; = {1,2,1,3,1,2,1,4,1,2,1,3,1,2,1}
• Threeasynchronousaction• Schedule,Del_flow,Add_flow
SmoothedRoundRobin
100
150
w1 =1
w2 =4
w3 =8
PQRS =100
0
0
50
100
100150 100
w4 =3 50100 1000
Deficitcounter
Scheduler50
• Fourflowswithfixedpacketsize(=", =9, =2, =;) withcorrespondingweights(<", <9, <2, <;)• <" = 1,<9 = 4,<2 = 8,<; = 3
• CorrespondingWSS,!; = {1,2,1,3,1,2,1,4,1,2,1,3,1,2,1}
• Threeasynchronousaction• Schedule, Del_flow, Add_flow
SmoothedRoundRobin
100
150
w1 =1
w2 =4
w3 =8
PQRS =100
0
0
100
100
100
w4 =3 50100 1000
Deficitcounter
Scheduler
• Fourflowswithfixedpacketsize(=", =9, =2, =;) withcorrespondingweights(<", <9, <2, <;)• <" = 1,<9 = 4,<2 = 8,<; = 3
• CorrespondingWSS,!; = {1,2,1,3,1,2,1,4,1,2,1,3,1,2,1}
• Threeasynchronousaction• Schedule, Del_flow, Add_flow
SmoothedRoundRobin
100
150
w1 =1
w2 =4
w3 =8
PQRS =100
0
0
0
100100
w4=3 50100 1000
Deficitcounter
Scheduler
empty
• Fourflowswithfixedpacketsize(=", =9, =2, =;) withcorrespondingweights(<", <9, <2, <;)• <" = 1,<9 = 4,<; = 3
• CorrespondingWSS,!2 = {1,2,1,3,1,2,1}
• Threeasynchronousaction• Schedule, Del_flow, Add_flow
SmoothedRoundRobin
100
150
w1 =1
w2 =4PQRS =100
0
0 100
w3 =3 50100 1000
Deficitcounter
Scheduler
AB =
AC"
AC9
AC2
=
0 0 1
1 0 0
0 1 1
• Fiveflowswithfixedpacketsize(=", =9, =2, =;, =4) withcorrespondingweights(<", <9, <2, <;, <4)• <" = 1,<9 = 4,<2 = 8,<; = 3,w4 = 17 =>CorrespondingWSS,!4
• Threeasynchronousaction• Schedule, Del_flow,Add_flow
SmoothedRoundRobin
100
150
w1 =1
w2 =4
w3 =8PQRS =100
0
100
50
100
100150 100
w3 =3 50100 1000
Deficitcounter
Scheduler
AB =
AC"
AC9
AC2
AC;
AC4
=
0 0 0
0 0 1
0 1
0 0
0 1 0
0 0 0
1 0 0
0 0
1 1
0 1
added
w5 =17 50100 1000
PropertiesofSRR
• Work-conserving• Ifthereareactiveflows,theSRRalwaysforwardit.
• Theorem1:=-><? isvisited<? timesbySRRinaround• Thenumberofreceivedservicebyschedulerofeachflowisproportionaltoitsweight• ThenumberoftheoccurrencesofelementL in!%(1 ≤ L ≤ *) is2%('
• Thenumberofelement3isin!4 is24(2 = 4
{1,2,1,3,1,2,1,4,1,2,1,3,1,2,1,5,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1}
PropertiesofSRR:Fairness
• Lemma2(Long-termfairness):Foranypairofbackloggedflows= andW,attheendofaroundinSRR,then
• Corollary1(Short-termfairness):Foranypairofbackloggedflows=andW inSRR,wehave
C?(0, X)
<?
−
CY(0, X)
<Y
Z = 0
C?(0, [) isthenumberoftimesthat=-><? isvisitedbySRRfromtime0to[
!?(0, [)
<?
−
!Y(0, [)
<Y
<* + 2 PQRS
2min(<?, <Y)
!?(0, [) isservicereceivedbyflows= fromtime0to[
Endofaround
PropertiesofSRR:SchedulingDelayBound
• SchedulingDelayBound b?• Schedulingdelay:timebetweenqueuingpacketandtransmittingthepacket.
• Theorem3:Theschedulingdelayboundof=-><? is
• Inverseproportionaltotheweight,proportionaltototalnumberofactiveflows• Cannotprovideastrictlyrate-proportionaldelaybound.• TheyclaimthatthedelayboundismuchbetterthanthatofDRR.
b? <2PQRS
<?
+ (c − 1)2PQRS
dN:thenumberofactiveflows
PropertiesofSRR:Scalability
• DifferentraterangescanbeaccommodatesbyWSSofthesameorderbyadjustingtherategranularity• 1kb/srategranularity• 1Mb/srategranularity
• SRRcanbeusedforvariablebandwidthcapacity• SRRworkswellregardlessofthenumberofflows.• TimecomplexityisO(1)
PropertiesofSRR:Complexity
• Spacecomplexity• -./% = 2
%− 1 becomesverylargeifkislargenumber.
• TheyclaimthateQRS = 32 isenough• Itcanprovide4Tb/sratewithgranularityof1kb/s
• Since 2* +, WSScanbeconstructedbyusing*+, WSSand * + 1 +, WSS,thespacecomplexityofSRRis2"f + g(c×eQRS)
• Timecomplexity• g(1) timetochooseapacketfortransmission• g(*) timetoaddordeleteaflow,where* istheorderofWSScurrentlyusedbySRR.
TostoreeQRS doublelinks.
Evaluation
2videostreamflows
10flowsofself-similartraffic
2ftpflows
Simulationtool:NS2multipleconstantbitrate(CBR)flows
WeightsofCBRflowsarepowersof2
SRRbetterthanWFQ SRRworsethanWFQ
WeightsofCBRflowsarerandomlychosen
SRRbetterthanWFQ SRRworsethanWFQ
WeightsofCBRflowsareequal
Discussion
• Weakness• Thepaperisnotwellwritten• Badworst-casefairness• IgnoretimeoverheadtoconstructhighorderWSS(32+,A!!) usingloworder(16+,&17+,A!!)
• Extension• Singleschedulertomulti-schedulerfairness?• Singeresource(bandwidth)tomulti-resourcefairness?• Queue-independentfairnesstoqueue-dependentfairness?
!?(0, [)
<?
−
!Y(0, [)
<Y
<* + 2 PQRS
2min(<?, <Y)
g(P./k)