1 / 134

Packet Scheduling/Arbitration in Virtual Output Queues and Others

Packet Scheduling/Arbitration in Virtual Output Queues and Others. Key Characteristics in Designing Internet Switches and Routers. Scalability in terms of line rates Scalability in terms of number of interfaces (port numbers). Switch/Router Architecture Comparison.

vidal
Download Presentation

Packet Scheduling/Arbitration in Virtual Output Queues and Others

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Packet Scheduling/Arbitration in Virtual Output Queuesand Others

  2. Key Characteristics in Designing Internet Switches and Routers • Scalability in terms of line rates • Scalability in terms of number of interfaces (port numbers)

  3. Switch/Router Architecture Comparison http://www.lightreading.com/document.asp?doc_id=47959

  4. Head-of-Line Blocking Blocked! Blocked!

  5. Crossbar Switches: Virtual Output Queues • Virtual Output Queues: • At each input port, there are N queues – each associated with an output port • Only one packet can go from an input port at a time • Only one packet can be received by an output port at a time • It retains the scalability of FIFO input-queued switches (no memory bandwidth problem) • It eliminates the HoL problem with FIFO input Queues

  6. Virtual Output Queues

  7. VOQs: How Packets Move VOQs Scheduler

  8. Scheduler Crossbar Scheduler in VOQ Architecture • Memory b/w=2R • Can be quite complex!

  9. Question: do more lanes help? • Answer: it depends on the scheduling VOQs with Bad Scheduling Head of Line Blocking Good Scheduling? Ayalon: depends on traffic matrix…

  10. Crossbar Scheduler in VOQ Architecture Which packets I can send during each configuration of the crossbar

  11. Cell Data Port Processor Port Processor Crossbar optics optics LCS Protocol LCS Protocol optics optics Request Grant/Credit Switch core architecture Port #1 Scheduler (Like the Processor of A Computer) Port #256

  12. Basic Switch Model S(n) L11(n) A11(n) 1 1 D1(n) A1(n) A1N(n) AN1(n) DN(n) AN(n) N N ANN(n) LNN(n)

  13. Occupancy L11(n) LNN(n) Some definitions 3. Queue occupancies:

  14. Some possible performance goals When traffic is admissible

  15. VOQ Switch Scheduling • The VOQ switch scheduling can be represented by a bipartite graph • The left-hand side nodes of the bipartite graph are the input ports • The right-hand side nodes of the bipartite graph are the output ports • The edges between the nodes are requests for packet transmission between input ports and output ports. A 1 2 B 3 C 4 D 5 E 6 F

  16. Maximum size bipartite match • Intuition: maximizes instantaneous throughput L11(n)>0 Maximum Size Match LN1(n)>0 Bipartite Match “Request” Graph

  17. Network flows and bipartite matching Finding a maximum size bipartite matching is equivalent to solving a network flow problem with capacities and flows of size “1”. A 1 2 B Sink t Source s 3 C 4 D 5 E 6 F

  18. 10 10 10 1 10 1 10 1 Network Flows a c Source s Sink t b d • Let G=[V,E] be a directed graph with capacity cap(v,w) on edge [v,w]. • A flow is an (integer) function, f, that is chosen for each edge so that f(v,w) <= cap(v,w). • We wish to maximize the flow allocation.

  19. 10 10 10 1 10 1 10 1 a c 10, 10 Source s Sink t 10, 10 1 10, 10 10 1 10 b d 1 Flow is of size 10 A maximum network flow exampleBy inspection a c Source s Sink t b d Step 1:

  20. Not obvious Maximum flow: a c 10, 9 Source s Sink t 10, 10 1,1 10, 10 1,1 10, 2 b d 10, 2 1, 1 Flow is of size 10+2 = 12 A maximum network flow example Step 2: a c 10, 10 Source s Sink t 10, 10 1 10, 10 1 10, 1 b d 10, 1 1, 1 Flow is of size 10+1 = 11

  21. Ford-Fulkerson method of augmenting paths • Set f(v,w) = -f(w,v) on all edges. • Define a Residual Graph, R, in which res(v,w) = cap(v,w) – f(v,w) • Find paths from s to t for which there is positive residue. • Increase the flow along the paths to augment them by the minimum residue along the path. • Keep augmenting paths until there are no more to augment.

  22. Example of Residual Graph a c 10, 10 10, 10 1 10, 10 s t 10 1 10 b d 1 Flow is of size 10 Residual Graph, R res(v,w) = cap(v,w) – f(v,w) a c 10 10 10 1 s t 10 1 10 b d 1 Augmenting path

  23. Example of Residual Graph a c 10, 10 10, 10 1 10, 10 s t 10 1 10 b d 1 Flow is of size 10 Residual Graph, R res(v,w) = cap(v,w) – f(v,w) a c 10 10 10 1 s t 10 1 10 b d 1 Augmenting path

  24. Example of Residual Graph Step 2: a c 10, 10 s t 10, 10 1 10, 10 1 10, 1 b d 10, 1 1, 1 Flow is of size 10+1 = 11 Residual Graph a c 10 s t 10 10 1 1 1 1 b d 9 1 9 Augmenting path

  25. Example of Residual Graph Step 3: a c 10, 9 s t 10, 10 1, 1 10, 10 1, 1 10, 2 b d 10, 2 1, 1 Flow is of size 10+2 = 12 Residual Graph a c 10 s t 10 10 1 2 1 2 b d 8 1 8

  26. f=4 12 12 a b 12 a b a b 16 20 16 20 16 20 9 4 9 s 10 t 9 4 7 s 10 t 4 s 10 t 7 7 4 13 4 4/13 4/4 4 11 4 4/11 c d 9 c d c d 7 An other Example: Ford-Fulkerson method find augmenting path p f=0 Gf G 12 a b 16 20 9 4 s 10 t 7 13 4 11 c d

  27. f=4+12 12/12 12 a b a b 4 8 12/16 12/20 12 12 9 9 4 s 10 t 4 s 10 t 7 7 4 4/13 4/4 4 4 4/11 9 c d c d 7 An other Example: Ford-Fulkerson method find augmenting path p f=4 Gf G 12 12 a b a b 16 20 16 20 9 9 4 s 10 t 4 s 10 t 7 7 4 4/13 4/4 4 4 4/11 9 c d c d 7

  28. f=16+7 12/12 12 a b a b 4 1 12/16 19/20 12 19 9 9 4 s 10 t 4 s 10 t 7/7 7 11 11/13 4/4 4 11/11 2 c d c d 11 An other Example: Ford-Fulkerson method find augmenting path p f=16 Gf G 12/12 12 a b a b 4 8 12/16 12/20 12 12 9 9 4 s 10 t 4 s 10 t 7 7 4 4/13 4/4 4 4 4/11 9 c d c d 7

  29. An other Example: Ford-Fulkerson method find augmenting path p f=23 Gf G 12/12 12 a b a b 4 1 12/16 19/20 12 19 9 9 4 s 10 t 4 s 10 t 7/7 7 11 11/13 4/4 4 11/11 2 c d c d 11 No more augmenting path Maximum Flow is 23

  30. S S S S S S S 10 10 0 10 10 10 10 10 10 9 9 9 9 9 9 9 9 10 10 10 10 0 9 9 9 9 9 9 9 9 10 10 10 0 10 10 10 10 10 T T T T T T T Input graph G Residual Graph Gr Flow graph Gf An example for Flow: Obvious solution Total flow = 10, Sub-optimal solution!

  31. S S S S S S S S S S S S S 10 9 10 10 0 10 10 10 10 10 10 10 10 10 10 1 10 10 10 10 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 10 10 10 10 1 10 10 0 9 9 9 9 9 9 9 9 9 9 9 10 1 10 10 9 9 9 9 9 9 10 0 9 10 10 10 10 10 10 10 10 10 10 10 10 1 T 10 10 10 10 T T T T T T T T T T T T Input graph G Residual Graph Gr Flow graph Gf Flow algorithm – Optimal version Total flow = 10 + 9 = 19 units! 9

  32. Complexity of network flow problems • In general, it is possible to find a solution by considering at most V.E paths, by picking shortest augmenting path first. • There are many variations, such as picking most augmenting path first. • The complexity of the algorithm is less when the graph is bipartite • There are techniques other than the Ford-Fulkerson method.

  33. Network flows and bipartite matching Ford - Fulkerson Algorithm – 1 Finding a maximum size bipartite matching is equivalent to solving a network flow problem with capacities and flows of size “1”. sink 1 2 3 4 5 6 a b c d e f source

  34. Ford - Fulkerson Algorithm – 2 sink Increasing the flow by 1. 1 2 3 4 5 6 a b c d e f source

  35. Ford - Fulkerson Algorithm – 3 sink Increasing the flow by 1. 1 2 3 4 5 6 a b c d e f source

  36. Ford - Fulkerson Algorithm – 4 sink Increasing the flow by 1. 1 2 3 4 5 6 a b c d e f source

  37. Ford - Fulkerson Algorithm – 5 sink Increasing the flow by 1. 1 2 3 4 5 6 a b c d e f source

  38. Ford - Fulkerson Algorithm – 6 sink Increasing the flow by 1. 1 2 3 4 5 6 a b c d e f source

  39. Ford - Fulkerson Algorithm – 7 sink Augmenting flow along the augmenting path. 1 2 3 4 5 6 a b c d e f source

  40. Ford - Fulkerson Algorithm – 8 sink Maximum flow found! Thus maximum matching found. 1 2 3 4 5 6 a b c d e f source

  41. Complexity of Maximum Matchings • Maximum Size/Cardinality Matchings: • Algorithm by Dinic O(N5/2) • Maximum Weight Matchings • Algorithm by Kuhn O(N3logN) • ftp://dimacs.rutgers.edu/pub/netflow/matching/ (contains code for maximum size/weighting algorithms) • In general: • Hard to implement in hardware • Slooooow.

  42. Maximum size bipartite match • Intuition: maximizes instantaneous throughput • for uniform traffic. L11(n)>0 Maximum Size Match LN1(n)>0 Bipartite Match “Request” Graph

  43. Why doesn’t maximizing instantaneous throughput give 100% throughput for non-uniform traffic? Three possible matches, S(n):

  44. Maximum weight matching S*(n) • Weight could be length of queue or age of packet • Achieves 100% throughput under all traffic patterns L11(n) A11(n) A1(n) D1(n) 1 1 A1N(n) AN1(n) AN(n) DN(n) ANN(n) N N LNN(n) L11(n) Maximum Weight Match LN1(n) Bipartite Match “Request” Graph

  45. Packet Scheduling/Arbitration in Virtual Output Queues: Maximal Matching Algorithms

  46. 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 Maximum size matching 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 2 1 8 8 Maximum weight matching 1 6 6 3 4 4 Maximum Matching in VOQ Architecture

  47. Complexity of Maximum Matchings • Maximum Size/Cardinality Matchings: • Algorithm by Dinic O(N5/2) • Maximum Weight Matchings • Algorithm by Kuhn O(N3logN) • In general: • Hard to implement in hardware • Slooooow.

  48. Maximal Matching • A maximal matching is a matching in which each edge is added one at a time, and is not later removed from the matching. • i.e., No augmenting paths allowed (they remove edges added earlier) – like by inspection. • No input and output are left unnecessarily idle.

More Related