Multi-Resource Fair Queueing For Packet Processing:, Vyas Sekar, Matei Zaharia, Ion Stoica
Multi-Resource Fair Queueing For Packet Processing:, Vyas Sekar, Matei Zaharia, Ion Stoica
Brook, 3KTH
Motivation
Flows increasingly have heterogeneous resource consumption
Intrusion detection bottlenecking on CPU Small packets bottleneck memory-bandwidth Unprocessed large packets bottleneck on link bw
Problem
How to schedule packets from different flows, when packets consume multiple resources?
Contribution
Allocation in Space Single-Resource Fairness Multi-Resource Fairness Max-Min Fairness DRF Allocation in Time Fair Queueing DRFQ
Outline
Analysis of Natural Policies DRF allocations in Space DRFQ: DRF allocations in Time Implementation/Evaluation
Strategy-proofness:
A flow shouldnt be able to finish faster by increasing the resources required to process it.
p2 p1 4 5
p2 p2 6 p2
p3
p3 p3 p3 9
p4
flow 1 flow 2
7 33%
10
11
flow 1 flow 2
Violation of Strategy-Proofness
Bottleneck fairness
Determine which resource is bottlenecked Apply FQ to that resource
100% 50%
48%
flow 1
flow 2
33%
flow 3
0%
CPU
NIC
0%
CPU
NIC
Natural Policy
Per-Resource Fairness (PRF)
Have a buffer between each resource Apply fair queueing to each resource
100% 50%
33%
66%
Flow 1 Flow 2
0%
14%
66%
33%
CPU
NIC
0%
CPU
NIC
11
12
Summary of Policies
Policy Fair Queueing a Single Resource Bottleneck Fairness Per-Resource Fairness Dominant Resource Fairness X X X Share Guarantee StrategyProofness
14
Outline
Analysis of Natural Policies DRF allocations in Space DRFQ: DRF allocations in Time Implementation/Evaluation
15
16
DRF Allocations
Dominant resource of a user is the resource she is allocated most of
Dominant share is the users share of her dominant resource
<16 CPUs, 16 GB mem> <3 CPU, 1 GB mem> dom res: CPU <1 CPU, 4 GB mem> dom res: mem
3 CPUs 12 GB 66% User 1 User 2
18
Outline
Analysis of Natural Policies DRF allocations in Space DRFQ: DRF allocations in Time Implementation/Evaluation
19
Memoryless Requirement
Virtual Clock simulates flows with dedicated 1/n link
Attach start and finish tags according to dedicated link Serve packet with smallest finish tag (work conserving)
Problem
During light load a flow might get more than 1/n That flow experiences long delays when new flows start
20
40
60
80
Real Time
Dove-tailing Requirement
FQ: flow size should determine service, not packet size
Flow with 10 1kb packets gets same service as 5 2kb packets
Requirement: dove-tailing
Packet processing times should be independent of how resource consumption is distributed in a flow
23
Tradeoff
Dovetailing and memoryless property at odds
Dovetailing needs to remember past consumption
Memoryless DRFQ
Attach a virtual start and finish time to every packet
S(p) and F(p) of packet p
Dovetailing DRFQ
Keep track of start and finish time per resource
Use max start time per resource for scheduling Dovetail by keeping track of all resource usage
28
DRFQ algorithm
DRFQ bounds dovetailing to processing time
Dovetail up to processing time units Memoryless beyond
DRFQ is a generalization
When =0 then DRFQ=memoryless DRFQ When = then DRFQ=dovetailing DRFQ
Outline
Analysis of Natural Policies DRF allocations in Space DRFQ: DRF allocations in Time Implementation/Evaluation
31
Isolation Experiment
DRFQ Implementation in Click
2 elephants: 40K/sec basic, 40K/sec IPSec 2 mice: 1/sec basic, 0.5/sec basic
Summary
Packet processing becoming evermore sophisticated
Consume multiple resources
35
36
Overhead
350 MB trace run through our Click implementation Evaluate overhead of two modules
Intrusion Detection, 2% overhead Flow monitoring, 4% overhead
37
CPU bottleneck: 7<1,6> + <7,1> = <14,43> NIC bottleneck: <1,6> + 6<7,1> = <43, 12> Periodically oscillates the bottleneck
40
Other contexts
VM scheduling in hypervisors Requests to a shared service (e.g. HDFS)
42