An Efficient Packet Scheduling Algorithm in Network Processors































- Slides: 31
An Efficient Packet Scheduling Algorithm in Network Processors 60 ---November 2004 --- CS 2
Packet Scheduling in Network Processors Design Goals: • The input load is well balanced among the worker processors • Flow order is maintained at the output port
Channel Stripping N channels l Sender: strip incoming traffic across the N channels l Receiver: combine the traffic into a single stream l
Surplus Round Robin
Desired Load Distribution Pattern D-Step: Packet Dispatching P-Step: Packet Processing T-Step: Packet Transmission Dynamic Batch Co. Scheduling (DBCS)
Problems to Be Addressed l Q: How much workload should be scheduled to each processor? A: Divisible load scheduling & “Processing unit: bytes or packets? ” l Q: What if the packets are of variable lengths? A: Packetized DBCS! “Packets Bytes” l Q: Go for Batches? A: To improve performance. Applicable to a dynamic nonbacklogged system. Q: How much workload should be scheduled in a batch? When to initiate the next batch? l A: Batch Size Determination & Scheduling Time Determination l l l Q: What if there are multiple flows? A: Fair scheduling among multiple flows with different reservations?
Load Scheduling Model Known: Zr, i wi Zs, i N l To determine: ai B Time l
Load Distribution in A Single Batch
Optimal Load Fractions in A Single Batch
Load Distribution in Batches
Batch Size Determination l Minimal schedulable batch size: I = C L (L: maximal possible length of a packet) l At least one packet should be dispatched to each processor: mini(ai. CL) >= L l Batch size: multiple of I B=m. I
Scheduling Time Determination
For a Homogeneous Sytem l zs, i = zr, i = z & wi = w ai = 1/N
N = 8 Gapr=Gapd=Gapi=0
N = 4 Gapr=Gapd>0 Gapi=0
N = 10 Gapr=Gapd=0 Gapi>0
Best Scheduling Time (N, m, L)
Scalability of the Throughput
Packetized DBCS : Dispatch Decision If (Packet. Size < Balancewhich ) Dispatch; Else if: (Packet. Size – Balancewhich <= Balancewhich) (Balancewhich >= Packet. Size/2) Dispatch; Else: Do not dispatch. Move on to next processor.
Packetized DBCS
Throughput Verification of P-DBCS
Out of Order Rate Verification of P-DBCS
Throughput Comparison
Out of Order Rate Comparison
Fair Scheduling Among Multiple Flows
Fair Scheduling Among Multiple Flows l Minimal schedulable batch size: I = C L (L: maximal possible length of a packet) l At least one packet should be dispatched to each processor: mini(ai. CL) >= L l At least one packet should be selected from each flow: mini(ri. CL) >= L l Batch size: multiple of I B=m. I l Load fraction for each flow: F i = ri B
Select Decision l (F 1, F 2, … , FM) (F 1’, F 2’, … , FM’) If (Packet. Size < FBalancewhich ) Select; Else if: (Packet. Size – FBalancewhich <= FBalancewhich) (FBalancewhich >= Packet. Size/2) Select; Else: Do not select. Move on to next flow.
Fair Scheduling Among Multiple Flows
Fair Scheduling Among Multiple Flows
Throughput of Multiple Flows l Reservations (0. 3, 0. 1, 0. 1)
Out of Order Rate of Multiple Flows