a simple qos packet scheduler for network routers

17
08/27/22 1 A Simple QoS Packet Scheduler for Network Routers Su Wen Presenting the paper in SIGCOM 2001 “SRR: An O(1) Time Complexity Packet Scheduler for Flows in Multi-Service Packet Networks”

Upload: conan-ortiz

Post on 31-Dec-2015

25 views

Category:

Documents


0 download

DESCRIPTION

A Simple QoS Packet Scheduler for Network Routers. Su Wen Presenting the paper in SIGCOM 2001 “SRR: An O(1) Time Complexity Packet Scheduler for Flows in Multi-Service Packet Networks”. Quality of Service. Current Internet Service Best effort Packet scheduling: FIFO QoS - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: A Simple QoS Packet Scheduler for Network Routers

04/19/23 1

A Simple QoS Packet Scheduler for Network

RoutersSu Wen

Presenting the paper in SIGCOM 2001

“SRR: An O(1) Time Complexity Packet Scheduler for Flows in Multi-

Service Packet Networks”

Page 2: A Simple QoS Packet Scheduler for Network Routers

04/19/23 2

Quality of Service

• Current Internet Service– Best effort– Packet scheduling: FIFO

• QoS– Demanded by new network services

• multimedia, audio/video

– Meets requirement in bandwidth, delay, jitter

Page 3: A Simple QoS Packet Scheduler for Network Routers

04/19/23 3

QoS Approaches

• Integrated Services– Provide service guarantees to individual flows in the

network• GPS - Generalized Processor Sharing• Weighted Fair Queuing

• Differentiated Services– Provide some service guarantees to different classes

of traffic in the network• Example: hierarchical link-sharing

– audio, video, telnet, ftp, mail

Page 4: A Simple QoS Packet Scheduler for Network Routers

04/19/23 4

Bandwidth Sharing• GPS - generalized processor sharing

• ideal model: each flow gets its fair share of BW – Si(t1, t2) / Sj(t1, t2) = wi/wj

– ri/r = wi/jwj

.

.

.

r

GPS Scheduler

server

• wi - weight of flow i

• Si (t1, t2) - amount of traffic served for flow I during time t1 to t2

• ri - service rate of flow i

• r - service rate of the server

flows

Page 5: A Simple QoS Packet Scheduler for Network Routers

04/19/23 5

Bandwidth Sharing Implementations

• Weighted Fair Sharing– An approximation/implementation of GPS– Each flow has separate queues– Two approaches:

• time-stamp based: e.g. virtual clock• round robin

Page 6: A Simple QoS Packet Scheduler for Network Routers

04/19/23 6

Implementation Characteristics

• Time Stamp based: – Fairly good fairness and delay bound – Time complexity: O(logN) - O(N)

• Round Robin based: DRR, CORR– Time complexity: O(1)– Short term unfairness

• bursty output

Page 7: A Simple QoS Packet Scheduler for Network Routers

04/19/23 7

SRR - Smoothed Round Robin

• Good short term and long term fairness– emulate GPS– work conserving

• forwards packets as long as there are active flows

• O(1) time complexity– one lookup to decide what to send

• Better scalability• Simplicity

Page 8: A Simple QoS Packet Scheduler for Network Routers

04/19/23 8

Data Structures

• Weight Matrix (WM)– number of rows = N - number of flows

– number of columns = k = log2wmax + 1• # of binary digits needed to represent the max normalized

weight

– WM size depends on # of flows and BW granularity

• WSS - Weight Spread Sequence– WSS of order k (Sk) is a sequence of integers from 1 to k– recursively defined

• S1 = 1• Sk = Sk-1, k, Sk-1

Page 9: A Simple QoS Packet Scheduler for Network Routers

04/19/23 9

Weight Matrix• Four flow f1 - f4, each with different BW requirement:

– r1 = 64kbps, r2 = 128kbps, r3 = 320kbps, r4 = 192kbps

– w1 = 1 -> {0 0 1}

– w2 = 2 -> {0 1 0}

– w3 = 5 -> {1 0 1}

– w4 = 3 -> {0 1 1}

• col1 col2 col3

• row1 0 0 1

• row2 0 1 0

• row3 1 0 1

• row4 0 1 1

Page 10: A Simple QoS Packet Scheduler for Network Routers

04/19/23 10

Weight Spread Sequence

• To find WSS of order 3 - S3

– S2, 3, S2 – S1, 2, S1, 3, S1, 2, S1

– 1, 2, 1, 3, 1, 2, 1

Rule:S1 = 1Sk = Sk-1, k, Sk-1

N - number of flowswi - normalized weight of flow ik - log2wmax + 1

Page 11: A Simple QoS Packet Scheduler for Network Routers

04/19/23 11

Scheduling Algorithm1 Generate a Service Queue:

• for each value i in the WSS• if jth row of column i of WM has value 1

– add flow j to the queue

2 Serve the flow indicated in the service queue in a round robin fashion

1, 2, 1, 3, 1, 2, 1

f3,

f1: {0 0 1} f2: {0 1 0} f3: {1 0 1}f4: {0 1 1}

Serve_flow(): deficitj += Lmax

while (Lj <= deficitj) { send pktj

deficitj -= Lj

}

deficiti - bytes need to be served of flow iLi - length of packet of flow iLmax - length of maximum packet size

f2, f4, f3 f1, f3, f4, f3, f2, f4, f3

S3: Flow Service Queue:

Page 12: A Simple QoS Packet Scheduler for Network Routers

04/19/23 12

Fairness• Long Term

– Si(0, t) / Sj(0, t) = wi/wj

– Si(0, t)/wi - Sj(0, t)/wj = 0

• Short Term– Si(0, t)/wi - Sj(0, t)/wj < (k+2)Lmax/2*min(wi,wj)

Si(t1, t2) - amount of traffic served for flow i during time t1 to t2

wi - normalized weight of flow ik - log2wmax + 1, the order of WSS

Page 13: A Simple QoS Packet Scheduler for Network Routers

04/19/23 13

Delay

• Df - maximum delay for flow f

– Df < 2*Lmax/wf + 2*(N-1)*Lmax/ i wi

• Inverse proportional to the weight of the flow• Proportional to total number of flows• Not strictly rate proportional, but better than

DRR– simulation result shows so

Page 14: A Simple QoS Packet Scheduler for Network Routers

04/19/23 14

Scalability

• Space requirement– N x k

• At 1kbps granularity, k=16 can accommodate rates up to 64Mbps

• At 1Mbps granularity, k=16 can accommodate rates up to 64Gbps

• Time complexity– O(1) to choose packets for transmission– O(k) to add or delete a flow

Page 15: A Simple QoS Packet Scheduler for Network Routers

04/19/23 15

SRR Problems• add_flow() and delete_flow() operations

– SRR scheduler is called during busy period• packets are back-logged

– add_flow() is called when new flow arrives– delete_flow() is called when queue of the flow is

empty

• If a flow is not back logged, add_flow() and may be called for every packet– quite expensive: O(k)

• Solution:– delay the deletion of a flow– not strictly O(1) any more

Page 16: A Simple QoS Packet Scheduler for Network Routers

04/19/23 16

Conclusion

• SRR is simple– even I can understand!

• Scalable– time and space

• Good performance– fairness– delay

Page 17: A Simple QoS Packet Scheduler for Network Routers

04/19/23 17

Questions?

• How did he come up with the algorithm?