340 likes | 565 Views
An Efficient Packet Scheduling Algorithm in Network Processors. CS260 ---November 2004---. 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.
E N D
An Efficient Packet Scheduling Algorithm in Network Processors CS260 ---November 2004---
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 • Sender: strip incoming traffic across the N channels • Receiver: combine the traffic into a single stream
Desired Load Distribution Pattern D-Step: Packet Dispatching P-Step: Packet Processing T-Step: Packet Transmission Dynamic Batch CoScheduling (DBCS)
Problems to Be Addressed • Q: How much workload should be scheduled to each processor? A: Divisible load scheduling & “Processing unit: bytes or packets?” • Q: What if the packets are of variable lengths? A: Packetized DBCS! “Packets Bytes” • Q: Go for Batches? A: To improve performance. Applicable to a dynamic non-backlogged system. • Q: How much workload should be scheduled in a batch? When to initiate the next batch? • A: Batch Size Determination & Scheduling Time Determination • 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 • To determine: aiBTime
Batch Size Determination • Minimal schedulable batch size: I = C L (L: maximal possible length of a packet) • At least one packet should be dispatched to each processor: mini(aiCL) >= L • Batch size: multiple of I B = m I
For a Homogeneous Sytem • zs,i = zr,i = z & wi = w ai = 1/N
Packetized DBCS : Dispatch Decision • If (PacketSize < Balancewhich ) Dispatch; • Else if: • (PacketSize – Balancewhich <= Balancewhich) • (Balancewhich >= PacketSize/2) Dispatch; Else: Do not dispatch. Move on to next processor.
Fair Scheduling Among Multiple Flows • Minimal schedulable batch size: I = C L (L: maximal possible length of a packet) • At least one packet should be dispatched to each processor: mini(aiCL) >= L • At least one packet should be selected from each flow: mini(riCL) >= L • Batch size: multiple of I B = m I • Load fraction for each flow: Fi= ri B
Select Decision (F1, F2, … , FM) (F1’, F2’, … , FM’) • If (PacketSize < FBalancewhich ) Select; • Else if: • (PacketSize – FBalancewhich <= FBalancewhich) • (FBalancewhich >= PacketSize/2) Select; Else: Do not select. Move on to next flow.
Throughput of Multiple Flows • Reservations (0.3, 0.3, 0.1, 0.1, 0.1, 0.1)