45
Eiel: Efficient and Flexible Software Packet Scheduling Ahmed Saeed, Yimeng Zhao, Nandita Dukkipati, Mostafa Ammar, Ellen Zegura, Khaled Harras, and Amin Vahdat 1

Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Eiffel: Efficient and Flexible Software Packet Scheduling

Ahmed Saeed, Yimeng Zhao, Nandita Dukkipati, Mostafa Ammar, Ellen Zegura, Khaled Harras, and Amin Vahdat

!1

Page 2: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

!2

Page 3: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

!4

Page 4: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

!6

WAN/Internet

WAN Link

Datacenter Network

Page 5: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

!7

WAN/Internet

Competition for Bandwidth at premium links between WAN traffic

Competition for Bandwidth

at the source between all traffic

Competition in the datacenter LAN

between all traffic

Page 6: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

!7

WAN/Internet

Large number of flows(> 10k flows per machine)

High speed links (10-100 Gbps)

Diversity in traffic(WAN vs LAN and

High vs Low priority)

Page 7: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Packet Scheduling• Scheduling determines the relative ordering as well

as transmission time of packets in a queuing data structure with respect to some ranking function

• Packet scheduling implements policies to solve such problems • Traffic Isolation• Flow Completion Time Optimization• Congestion Control

!8

Page 8: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Scheduler Implementation• Hardware schedulers in ASICs, FPGAs, or NPUs

• Preprogrammed policies in switches or NICs

• Programmable schedulers

• Software schedulers at end hosts or middleboxes

• Kernel Queuing Disciplines (Qdiscs)

• Userspace networking stacks

!9

Page 9: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Software vs Hardware

• Hardware lags behind network needs

• Software serves as a good experimental environment before hardware deployment

• Software provides a “build once, deploy many”

!10 End host

Middlebox

Page 10: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Challenges of Network Scheduling

• Accurate scheduling

• Efficient CPU and memory implementation

• Diversity of requirements

!11

Time

RateBursty

Time

RatePaced

O(log(n)) O(1)

Strict Priority

Hierarchical Weighted Fair Queuing

Rate Limiting

Shortest RemainingTime First

Page 11: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Objective: Design an accurate, efficient, and programmable

software scheduler

!12

Page 12: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Outline

• Eiffel Overview

• Characteristics of Packet Ranks

• Efficient Packet Ordering: Integer Priority Queues

• Scheduler Programmability

• Evaluation

!13

Page 13: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Eiffel Overview

!14

To NIC

Queuing Data Structure

Anno

tato

r

Enqueue Dequeue

Scheduler Controller

Scheduling Policy Desc.

Page 14: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Eiffel Overview

• Efficient building block for packet sorting operating at line rate

• Expressive abstraction that can capture a wide range of policies!15

To NIC

Queuing Data Structure

Anno

tato

rEnqueue Dequeue

Scheduler Controller

Scheduling Policy Desc.

Page 15: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Characteristics of Packet Ranks

!16

Page 16: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Ranks are Integers

• Packet carry limited precision integer priorities of width w bits

• QoS-based priority

• Time-based priority

• Flow size-based priority

!17

Page 17: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Ranks have Known Ranges• Semantics of priority values typical have limited

ranges within the whole range of integer representation

• Time-based priorities: from now to a few seconds in the future

• Flow size-based priorities: values are known from typical application behavior

• Strict priority ranges: policy/network operator defined

!18

0 2w

Values of Interest

Page 18: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

ApplicationApplication

Processing Speed

Network Processing

NIC (20Gbps)

60B packet every 24 ns 1500B packet every 600 ns

!21

Packets are Processed in Batches

Page 19: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

ApplicationApplication

Processing Speed

Network Processing

NIC (20Gbps)

60B packet every 24 ns 1500B packet every 600 ns

Processing delay is in 100s of ns

!22

Packets are Processed in Batches

Page 20: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

ApplicationApplication

Processing Speed

Network Processing

NIC (20Gbps)

60B packet every 24 ns 1500B packet every 600 ns

Processing delay is in 100s of ns

Packets have to be processed in batches, rendering all packets in a batch to have virtually the same rank

!23

Packets are Processed in Batches

Page 21: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Bucketed Data Structure + Limited number

of buckets + Algorithm to find min/max non-empty bucket

= Integer Priority Queues

!27

Eiffel Building Block

Page 22: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Efficient Packet Ordering: Integer Priority Queues

!28

Page 23: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Priority Queues 101

• Binary trees, Binomial Heap, Fibonacci Heap

• Support ExtractMin/ExtractMax

• Overhead of O(log n) on insertion or extraction

• Requires definition of a comparison operator: Comparison-based Priority Queues

!29

Page 24: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Integer Priority Queue

• Bucketed queues of N buckets

• Bucket index is the priority of elements in the bucket

• O(1) insertion and change priority

• O(Logw N) ExtractMin/ExtractMax

P0 P1 … … PN

!30

Page 25: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Integer Priority Queue

• Bucketed queues of N buckets

• Bucket index is the priority of elements in the bucket

• O(1) insertion and change priority

• O(Logw N) ExtractMin/ExtractMax

P0 P1 … … PN

Packets have known priority range and can be grouped into coarse granularity buckets

Packets have integer priority are captured in limited precision integers

!31

Page 26: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

FFS-based Integer Priority Queue

!32

Page 27: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

FFS-based Integer Priority Queue

• FindFirstSet (FFS) in a 64-bit word in 3 CPU cycles• Every bucket is represented by a bit• Bit is set iff bucket is not empty

• O(1) Integer Priority Queue in for N=64• Linux Real Time Process Scheduler• Quick Fair Queuing (QFQ)

[F. Checconi et al. INFOCOM ’13]

!33

Page 28: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Hierarchical FFS-based Queue

0 1 2 3 4 5

1 0 0 0 1 1

Queue

Bitmap Meta Data1 0 1 0

1 1

Packets

Root

Leaf

!34

Page 29: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Circular Hierarchical FFS-based Queue

242 243 244 245 246 247

0 0 0 1 1 1

Queue

Bitmap Meta Data0 1 1 0

1 1

248 249 250 251 252 253

1 0 0 0 0 0

1 0 0 0

1 0

Primary SecondaryPackets

!35

Page 30: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Circular Hierarchical FFS-based Queue

242 243 244 245 246 247

0 0 0 1 1 1

Queue

Bitmap Meta Data0 1 1 0

1 1

248 249 250 251 252 253

1 0 0 0 0 0

1 0 0 0

1 0

Primary SecondaryPackets

!36

cFFS-based queues has a small memory footprint and requires O(logw N) steps for ExtractMin operating over a small N

Page 31: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Scheduler Programmability

!37

Page 32: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

PIFO Programming Model

• Eiffel extends Push In First Out (PIFO) model

• PIFO model capture hierarchical policies using tress of priority queues [Sivaraman et. al SIGCOMM ’16]• Packet ranking is performed on enqueue

• Scheduling and shaping are tightly coupled in a single transaction

• Implemented in hardware through parallel comparisons

!38

Page 33: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Eiffel Programming Model

• Eiffel model extends the PIFO model• Packets can be ordered based on flow ranking

• Flows and packets can be ranked on enqueue and dequeue

• Shaping and scheduling are decoupled for efficiency

!39

Page 34: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Eiffel Example: pFabric

!40

10080 60100

• Each packet is tagged with Remaining Processing Time

• Packets are transmitted with Shortest Remaining Processing Time First (SRPTF)

• To avoid starvation, earliest packet from the highest priority flow is transmitted

• pFabric requires prioritizing flows based on ranks of packets

Page 35: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Eiffel Example: pFabric

!40

10080

40

60100

• Each packet is tagged with Remaining Processing Time

• Packets are transmitted with Shortest Remaining Processing Time First (SRPTF)

• To avoid starvation, earliest packet from the highest priority flow is transmitted

• pFabric requires prioritizing flows based on ranks of packets

Page 36: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Eiffel Example: pFabric

!40

100 804060 100

• Each packet is tagged with Remaining Processing Time

• Packets are transmitted with Shortest Remaining Processing Time First (SRPTF)

• To avoid starvation, earliest packet from the highest priority flow is transmitted

• pFabric requires prioritizing flows based on ranks of packets

Page 37: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Eiffel Example: Implementation

• Data structures• Priority Queue per policy that ranks flows• FIFO queue per-flow

• On packet enqueue• Check packet tag and update flow rank• Update flow position in priority queue

!41

80 10020 40 60

100

60

100

80

Rank 80 Rank 60

Page 38: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Eiffel Example: Implementation

• Data structures• Priority Queue per policy that ranks flows• FIFO queue per-flow

• On packet enqueue• Check packet tag and update flow rank• Update flow position in priority queue

!41

80 10020 40 60

100

60

100

80

Rank 60

40

Rank 40

Page 39: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Eiffel Example: Implementation

• Data structures• Priority Queue per policy that ranks flows• FIFO queue per-flow

• On packet enqueue• Check packet tag and update flow rank• Update flow position in priority queue

!41

80 10020 40 60

100

60

100

80

Rank 60

40

Rank 40

Page 40: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Evaluation

!42

Page 41: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Evaluation Setup

• Two servers with Intel X520-SR2 dual port NICs

• Eiffel implemented in Berkeley Extensible Software Switch (BESS)

• BESS runs on a single dedicated core

• Traffic generated using BESS FlowGen with varying number of flows and fixed 1500B packets

!43

10 Gbps

Measurements

NIC

BESS

FlowGen

NIC

BESS

Page 42: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Evaluation

!44

0 2000 4000 6000 8000

10000

100 1000 10000 100000 1x106Rate

(M

bps)

Number of flows

pFabric - EiffelpFabric - Binary Heap

Page 43: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Evaluation

!45

0 2000 4000 6000 8000

10000

100 1000 10000 100000 1x106Rate

(M

bps)

Number of flows

pFabric - EiffelpFabric - Binary Heap

Eiffel improves capacity by 5x in terms of number of flows that can be handled at line rate

Page 44: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Conclusion

• Eiffel network operators to deploy complex scheduling policies at end hosts and middle boxes

• Eiffel advantages make a strong case for rethinking the building blocks of packet in scheduling in hardware

!46

Page 45: Eiffel: Efficient and Flexible Software Packet Scheduling · • Each packet is tagged with Remaining Processing Time • Packets are transmitted with Shortest Remaining Processing

Questions?

!47