On the Fairness-Efficiency Tradeoff for Packet Processing with - - PowerPoint PPT Presentation

on the fairness efficiency tradeoff for packet processing
SMART_READER_LITE
LIVE PREVIEW

On the Fairness-Efficiency Tradeoff for Packet Processing with - - PowerPoint PPT Presentation

On the Fairness-Efficiency Tradeoff for Packet Processing with Multiple Resources Wei Wang, Chen Feng, Baochun Li, Ben Liang Department of Electrical and Computer Engineering University of Toronto December 4th, 2014 Middleboxes and Deep


slide-1
SLIDE 1

On the Fairness-Efficiency Tradeoff for Packet Processing with Multiple Resources

Wei Wang, Chen Feng, Baochun Li, Ben Liang Department of Electrical and Computer Engineering University of Toronto December 4th, 2014

slide-2
SLIDE 2

Middleboxes and Deep Packet Inspection

  • Process packets based on payload
  • IPsec, Monitoring, Firewalls, WAN optimization, etc

2

Private Network Public Network Middleboxes (Packet filter, NAT) Servers Users

slide-3
SLIDE 3

Consumption of Multiple Resources

  • Packet processing requires multiple types of resources

(e.g., CPU, memory b/w, link b/w)

  • Different middlebox (MB) modules consume different

amounts of resources

3

Ghodsi et al. SIGCOMM’12

slide-4
SLIDE 4

Resources should be shared fairly and efficiently among flows

4

slide-5
SLIDE 5

Fairness

  • Predictable service isolation
  • The service a flow receives in an n-flow system is at

least 1/n of that it achieves when the flow monopolizes all resources

  • Dominant Resource Fairness (DRF)
  • Flows receive approximately the same processing time
  • n the dominant resources of their packets

5

slide-6
SLIDE 6

Efficiency

  • High resource utilization given a non-empty system, with

high traffic throughput

  • Important in today’s enterprise networks, as a surging

volume of traffic now passes through MBs

6

slide-7
SLIDE 7

However, fairness and efficiency are conflicting objectives in the presence of multiple resources

7

slide-8
SLIDE 8

Fair but Inefficient

  • Fair: both flows receive 9 time units to process on their

dominant resources in each round

  • Inefficient: link is idle at 1/3 of time

8

p6 q1 q1

... ...

p1 p1 p2 p3 p4 p5 p6 p2 p3 p4 p5 q2

CPU Link Time 6 8 12 14 18 2 4 10 16 20 22 24 26

(a) A packet schedule that is fair but inefficient.

slide-9
SLIDE 9

Efficient but Unfair

  • Unfair: Flow 1 receives 96% of the link bandwidth; Flow 2

receives 36% of the CPU time

  • Efficient: 100% CPU and link utilization given a non-

empty system

9

CPU Link

p9 p10 q1

... ...

p1 p1 p2 p3 p4 p5 p6 p7 p8 p2 p3 p4 p5 p6 p8 p7 p9

Time 6 8 12 14 18 2 4 10 16 20 22 24 26

q1

(b) A packet schedule that is efficient but unfair.

slide-10
SLIDE 10

Ideally…

  • Allow the network operator to flexibly specify the tradeoff

preference

  • Many applications may have loose fairness

requirements

  • Implement the specified tradeoff via a queueing algorithm

10

slide-11
SLIDE 11

However…

  • Existing multi-resource queueing algorithms focus only on

fairness, without efficiency consideration

  • The tradeoff problem has never been mentioned

before, and is unique to multi-resource scheduling

  • Even the efficiency measure is unclear!

11

slide-12
SLIDE 12

The Efficiency Measure

12

slide-13
SLIDE 13

Schedule Makespan

  • Time elapsed from the arrival of the first packet to the

time when all packets finish processing on all resources

  • The completion time of the last flow

13

Max efficiency = Min makespan

slide-14
SLIDE 14

Quantifying the Efficiency Loss

  • Theoretical results
  • m: # of resource types concerned
  • the makespan of fair queueing could be up to m times

the optimal makespan

  • Experiment confirms 20% throughput loss of existing

multi-resource fair queueing

14

slide-15
SLIDE 15

Makespan minimization is notoriously hard, especially when there are more than two types of resources concerned (NP-hard)

15

slide-16
SLIDE 16

We limit our discussion to the two most concerned types of resources for packet processing—CPU and link bandwidth

16

slide-17
SLIDE 17

Our Approach

  • Relax the scheduling problem to an idealized fluid model
  • Discuss the tradeoff between fairness and efficiency in

the fluid model

  • Implement the fluid model in the real world via a packet-

by-packet tracking algorithm

17

slide-18
SLIDE 18

The Fluid Relaxation: packets are assumed to receive services in arbitrarily small increments on all resources

18

slide-19
SLIDE 19

Fluid Relaxation

  • Discrete schedule
  • Fluid relaxation

19

p6 q1 q1

... ...

p1 p1 p2 p3 p4 p5 p6 p2 p3 p4 p5 q2

CPU Link Time 6 8 12 14 18 2 4 10 16 20 22 24 26

q1 q2 p1

CPU Link

p2 p3 p4 p5 p6 p1 p2 p3 p4 p5 p6

Time 6 8 12 14 18 2 4 10 16 20 22 24 26

q1 q2

slide-20
SLIDE 20

Fluid w/ the Perfect Fairness

  • Implement the strict DRF allocation at all times
  • All flows receive the same fair dominant share

20

max

di

min

i2B di

s.t. X

i2B

¯ τi,rdi  1, r = 1, 2 .

Max-min flow’s dominant share Resource constraints

= ¯ d = 1/ max P

i ¯

τi,1, P

i ¯

τi,2

slide-21
SLIDE 21

Fluid w/ the Optimal Efficiency

  • Greedily maximizes the system dominant share at all

times

21

max

di0

X

i2Bt

di s.t. X

i2Bt

¯ τi,rdi ≤ 1, r = 1, 2.

Resource constraints Maximize system dominant share

slide-22
SLIDE 22

Fairness-Efficiency Tradeoff

22

slide-23
SLIDE 23

Specifying Fairness Requirement

  • Let be the fair dominant share under DRF
  • Let be a fairness knob specified by the operator
  • Fairness constraint: flows receive at least -portion of

fair dominant share

23

α ∈ [0, 1] α

X

∈B

di ≥ α ¯ d, ∀i ∈ B,

Fair share under DRF Dominant share of flow i

¯ d

slide-24
SLIDE 24

Fairness-Efficiency Tradeoffs

  • Maximize the system dominant share under a specified

tradeoff level (quantified by fairness knob )

24

max

di

X

i∈Bt

di s.t. X

i∈Bt

¯ τi,rdi ≤ 1, r = 1, 2, di ≥ α ¯ d, ∀i ∈ Bt .

Fairness constraint Resource constraint

α ∈ [0, 1]

slide-25
SLIDE 25

Implement the fluid model via packet-by-packet tracking

25

slide-26
SLIDE 26

Start-Time Tracking

  • Maintain the Tradeoff Fluid as a reference system in the

background

  • In the real world, whenever there is a packet scheduling
  • pportunity, the one that starts the earliest in the Tradeoff

Fluid is scheduled first

  • An O(log n) implementation based on a special structure of

the Tradeoff Fluid

  • Asymptotically close to the fluid model in terms of both

makespan and fairness guarantee

26

slide-27
SLIDE 27

Evaluation

27

slide-28
SLIDE 28

Experiment Setup

  • Prototype implementation in Click modular router
  • 60 UDP flows each sending 2,000 800-byte pkts/s
  • Three middlebox processing modules
  • Packet checking (bandwidth-bound): Flows 1~20
  • Statistical monitoring (bandwidth-bound): Flow 21~40
  • IPsec (CPU-bound): Flows 41~60

28

slide-29
SLIDE 29

Scenario 1: No packet drop

29

slide-30
SLIDE 30

Makespan

  • Each flow sends 10s traffic
  • Trading off 15% of fairness is sufficient to achieve the

shortest makespan (20% throughput improvement)

30

α Makespan (s) Normalized Makespan (%) 1.00 55.68 100.00 0.95 52.50 94.28 0.90 48.97 87.95 0.85 47.17 84.72 0.70 47.13 84.64 0.60 47.07 84.54 0.50 47.07 84.54

slide-31
SLIDE 31

Fairness

31

50 60 70 80 90 100 1 2 3 4 5 6 7 α (%) Dominant Share (%)

slide-32
SLIDE 32

Scenario 2: buffer size=200

32

slide-33
SLIDE 33

Resource Utilization

33

80 85 90 95 100 60 70 80 90 100 α (%) Average Utilization (%) CPU B/W

(a) Resource utilization.

slide-34
SLIDE 34

Dominant Share

34

20 40 60 1 2 3 4 5 Flow ID Mean Dom. Share (%) α = 0.85 α = 0.90 α = 0.95 α = 1.00

slide-35
SLIDE 35

Per-Packet Latency

35

0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 Per−Packet Latency (s) CDF α = 0.85 α = 0.90 α = 0.95 α = 1.00

(c) Per-packet latency

slide-36
SLIDE 36

Conclusions

  • We have identified the problem of fairness-efficiency

tradeoffs for multi-resource packet scheduling

  • We have designed a scheduling algorithm to achieve a

flexible tradeoff between fairness and efficiency for packet processing that requires both CPU and link bandwidth

  • We have prototyped the tradeoff algorithm in Click.

Experimental results show that slight fairness tradeoff is sufficient to achieve the highest efficiency

36

slide-37
SLIDE 37

weiwang@ece.utoronto.ca http://iqua.ece.toronto.edu/~weiwang/

37

Thank you!