low complexity multi resource fair queueing with bounded
play

Low Complexity Multi-Resource Fair Queueing with Bounded Delay Wei - PowerPoint PPT Presentation

Low Complexity Multi-Resource Fair Queueing with Bounded Delay Wei Wang , Ben Liang, Baochun Li Department of Electrical and Computer Engineering University of Toronto May 1, 2014 Background Middleboxes are widely deployed in todays


  1. Low Complexity Multi-Resource Fair Queueing with Bounded Delay Wei Wang , Ben Liang, Baochun Li Department of Electrical and Computer Engineering University of Toronto May 1, 2014

  2. Background ‣ Middleboxes are widely deployed in today’s network ‣ IPsec, Monitoring, Firewalls, WAN optimization, etc Users Public Private Network Network Middleboxes (Packet filter, NAT) Servers 2

  3. Background ‣ Performing complex network functions requires multiple middlebox resources ‣ CPU, memory b/w, link b/w Ghodsi SIGCOMM’12 3

  4. How to fairly share multiple resources among flows? 4

  5. Desired Fair Queueing Algorithm ‣ Fairness ‣ Bounded scheduling delay ‣ Low complexity 5

  6. Dominant Resource Fairness (DRF) ‣ Dominant resource : The resource that requires the most processing time ‣ A packet p requires 1 ms of CPU processing, and 3 ms of link transmission ‣ Link bandwidth is its dominant resource

  7. Dominant Resource Fairness (DRF) ‣ Max-min fairness on flow’s processing time of the dominant resource ‣ Flows receive the same processing time on their respective dominant resources ... ... CPU CPU P1 Q1 Q1 P2 Q2 Q2 P3 Q3 Q3 P4 Q4 Q4 ... ... Link Link Q1 P1 P1 P2 P2 Q2 P3 P3 Q3 P4 P4 0 0 2 2 4 4 6 6 8 8 10 10 12 12 14 14 Time Time 7

  8. Desired Fair Queueing Algorithm ‣ Fairness ‣ Bounded scheduling delay ‣ Low complexity 8

  9. Scheduling Delay ‣ Scheduling delay of packet p ‣ D(p) = t2 - t1 ‣ t1: time when p reaches the head of its queue ‣ t2: time when p finishes service on all resources 9

  10. Bounded Scheduling Delay ‣ Scheduling delay is bounded by a small constant factor ‣ Inversely proportional to a flow’s weight D i ( p ) ≤ C/w i 10

  11. Desired Fair Queueing Algorithm ‣ Fairness ‣ Bounded scheduling delay ‣ Low complexity 11

  12. Low Complexity ‣ Make scheduling decisions at O(1) time ‣ Independent of the number of flows ‣ Easy to implement 12

  13. The State-of-the-art ‣ Dominant Resource Fair Queueing (DRFQ) [Ghodsi12] ‣ High complexity O(log n) ‣ Multi-resource round robin (MR 3 ) [ICNP13] ‣ O(1) time ‣ May incur unbounded delay for weighted flows 13

  14. We propose Group Multi- Resource Round Robin (GMR 3 ) 14

  15. GMR 3 ‣ O(1) time ‣ Bounded scheduling delay ‣ Near-perfect fairness 15

  16. Delay Problem of Multi-Resource Round Robin ‣ Flow 1 weighs 1/2, while flow 2 to 6 each weighs 1/10 ... 2 P 1 3 P 1 P 6 P 1 1 P 1 4 P 1 P 2 P 3 P 4 P 5 P 1 P 1 CPU 1 � 5 1 1 1 1 6 7 ... Link P 1 P 1 P 1 1 P 6 P 1 P 1 P 1 P 2 1 P 3 1 P 4 1 P 5 1 4 5 1 6 2 3 0 2 4 6 8 10 12 14 16 Time � ‣ Flows with large weights are served in a “burst” mode ‣ Some packets have to wait for an entire round to be scheduled 16

  17. An Improvement ‣ Spread the scheduling opportunities over time, in proportion to flows’ respective weights ... P 1 P 1 P 6 P 1 P 2 P 1 P 3 P 4 P 5 P 1 P 1 P 2 CPU � 3 4 1 1 1 2 1 1 1 5 6 2 ... Link P 1 P 1 P 1 P 6 P 1 P 2 P 1 P 3 P 1 P 4 P 5 1 4 5 1 6 1 2 1 3 1 1 � 0 2 4 6 8 10 12 14 16 Time ‣ Packets do not need to wait for a long round to get scheduled 17

  18. Flow Grouping P n ‣ Normalized flow weights i =1 w i = 1 . ‣ Flow group k G k = { i : 2 − k ≤ w i < 2 − k +1 } , k = 1 , 2 , . . . � ‣ Flows with approximately the same weights ‣ A small number of flow groups by n g ≤ log 2 W . practical flow weight ‣ W — w i / min w j max i j 18

  19. Distributing Scheduling Opportunities ‣ Virtual slot 0, 1, 2, …, each representing a scheduling opportunity of a flow ‣ Each flow i of flow group G k is assigned to exactly one slot every 2 k slots, roughly matching its weight G k = { i : 2 − k ≤ w i < 2 − k +1 } , k = 1 , 2 , . . . 19

  20. An example ‣ Flow group G1 — flow 1 (weight = 1/2) ‣ Flow group G4 — flow 2 to 6 (weight = 1/10) 0 1 2 3 4 5 6 7 8 9 10 12 14 16 17 Slot ... f 1 f 1 f 2 f 1 f 3 f 1 f 4 f 1 f 5 f 1 f 6 1 f 7 f 8 f 9 f 2 CPU 4 1 1 2 1 3 1 1 5 1 6 1 1 2 f 3 f 1 f 5 f 6 f 7 f 8 f 9 Link f 1 f 1 f 2 f 1 f 4 f 1 f 1 ... 4 1 1 1 1 1 1 1 1 2 1 3 5 6 0 2 4 6 8 10 12 14 16 18 20 22 24 26 Time 20

  21. Fine tune the dominant service a flow receives at each scheduling opportunity 21

  22. Credit System ‣ Each flow maintains a credit account ‣ Credit balance represents the deserved dominant service in the current round ‣ Deposit credits upon a scheduling opportunity ‣ Withdraw credits at the end of a scheduling opportunity ‣ credits = the dominant services received due to this scheduling opportunity 22

  23. Depositing Credits respective weights. ‣ Flow i belonging to flow group G k : since 2 − k ≤ w i < 2 − k +1 , that ‣ Credits deposited upon a scheduling opportunity ∈ c i = 2 k Lw i , � ‣ L — Maximum packet processing time ‣ Roughly the same amount of credits L ≤ c i < 2 L . 23

  24. Potential Progress Gap 0 1 2 3 4 5 6 7 8 9 10 12 14 16 17 Slot � ... f 1 f 1 f 2 f 1 f 3 f 1 f 4 f 1 f 5 f 1 f 6 1 f 7 f 8 f 9 f 2 CPU 4 1 1 2 1 3 1 1 5 1 6 1 1 2 f 3 f 1 f 5 f 6 f 7 f 8 f 9 Link f 1 f 1 f 2 f 1 f 4 f 1 f 1 ... 4 1 1 1 1 1 1 1 1 2 1 3 5 6 � 0 2 4 6 8 10 12 14 16 18 20 22 24 26 Time ‣ A flow may not receive dominant services in the assigned virtual slot ‣ Potential progress gap may lead to arbitrary unfairness 24

  25. Progress Control Mechanism ‣ Enforce roughly consistent progress across all resources ‣ Upon the k th scheduling opportunity, defer flow i ’s service until it has already received service on the last resource due to the previous opportunity ( k -1) ‣ Work progress on any two resources will not differ too much 25

  26. Two-Level Hierarchical Scheduling ‣ Combine flows with similar weights into a flow group ‣ Inter-group scheduling — determine which flow group to choose ‣ Intra-group scheduling — determine which flow to choose from the selected flow group ‣ Round robin ‣ Credit system + Progress control mechanism 26

  27. Performance Analysis ‣ n — # of flows m — # of resources ‣ W — L — Max pkt proc time w i / min w j max i j n IS THE NUMBER OF FLOWS , AND m IS THE NUMBER OF RESOURCES . Fairness 1 Scheme Complexity Scheduling Delay O (log n ) L (1 /w i + 1 /w j ) DRFQ [10] Unknown MR 3 [17] 4( m + W ) 2 L/w i O (1) 2 L (1 /w i + 1 /w j ) GMR 3 O (1) 9 L (1 /w i + 1 /w j ) 24 mL/w i 27

  28. Simulation Results 28

  29. Normalized Dom. Serv. (s) 40 Basic Stat. Mon. 39.5 IPSec 39 38.5 38 0 5 10 15 20 25 30 Flow ID (a) Normalized dominant service. 29

  30. 1 0.8 0.6 CDF 0.4 DRFQ MR 3 0.2 GMR 3 0 0 20 40 60 80 Scheduling Delay (ms) (b) CDF of the scheduling delay. 30

  31. Conclusions ‣ GMR 3 , a two-level hierarchical scheduling algorithm ‣ The first multi-resource fair queueing of ‣ O(1) complexity ‣ near-perfect fairness ‣ bounded scheduling delay 31

Recommend


More recommend