Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS252 Graduate Computer Architecture Lecture 15 Multiprocessor Networks March 14 th, 2011 John Kubiatowicz Electrical Engineering and Computer Sciences.

Similar presentations


Presentation on theme: "CS252 Graduate Computer Architecture Lecture 15 Multiprocessor Networks March 14 th, 2011 John Kubiatowicz Electrical Engineering and Computer Sciences."— Presentation transcript:

1 CS252 Graduate Computer Architecture Lecture 15 Multiprocessor Networks March 14 th, 2011 John Kubiatowicz Electrical Engineering and Computer Sciences University of California, Berkeley http://www.eecs.berkeley.edu/~kubitron/cs252

2 3/14/2011 cs252-S11, Lecture 15 2 Topological Properties Routing Distance - number of links on route Diameter - maximum routing distance Average Distance A network is partitioned by a set of links if their removal disconnects the graph

3 3/14/2011 cs252-S11, Lecture 15 3 Interconnection Topologies Class of networks scaling with N Logical Properties: –distance, degree Physical properties –length, width Fully connected network –diameter = 1 –degree = N –cost? »bus => O(N), but BW is O(1) - actually worse »crossbar => O(N 2 ) for BW O(N) VLSI technology determines switch degree

4 3/14/2011 cs252-S11, Lecture 15 4 Example: Linear Arrays and Rings Linear Array –Diameter? –Average Distance? –Bisection bandwidth? –Route A -> B given by relative address R = B-A Torus? Examples: FDDI, SCI, FiberChannel Arbitrated Loop, KSR1

5 3/14/2011 cs252-S11, Lecture 15 5 Example: Multidimensional Meshes and Tori n-dimensional array –N = k n-1 X...X k O nodes –described by n-vector of coordinates (i n-1,..., i O ) n-dimensional k-ary mesh: N = k n –k = n  N –described by n-vector of radix k coordinate n-dimensional k-ary torus (or k-ary n-cube)? 2D Grid 3D Cube 2D Torus

6 3/14/2011 cs252-S11, Lecture 15 6 On Chip: Embeddings in two dimensions Embed multiple logical dimension in one physical dimension using long wires When embedding higher-dimension in lower one, either some wires longer than others, or all wires long 6 x 3 x 2

7 3/14/2011 cs252-S11, Lecture 15 7 Trees Diameter and ave distance logarithmic –k-ary tree, height n = log k N –address specified n-vector of radix k coordinates describing path down from root Fixed degree Route up to common ancestor and down –R = B xor A –let i be position of most significant 1 in R, route up i+1 levels –down in direction given by low i+1 bits of B H-tree space is O(N) with O(  N) long wires Bisection BW?

8 3/14/2011 cs252-S11, Lecture 15 8 Fat-Trees Fatter links (really more of them) as you go up, so bisection BW scales with N

9 3/14/2011 cs252-S11, Lecture 15 9 Butterflies Tree with lots of roots! N log N (actually N/2 x logN) Exactly one route from any source to any dest R = A xor B, at level i use ‘straight’ edge if r i =0, otherwise cross edge Bisection N/2 vs N (n-1)/n (for n-cube) 16 node butterfly building block

10 3/14/2011 cs252-S11, Lecture 15 10 k-ary n-cubes vs k-ary n-flies degree n vs degree k N switches vs N log N switches diminishing BW per node vs constant requires localityvs little benefit to locality Can you route all permutations?

11 3/14/2011 cs252-S11, Lecture 15 11 Benes network and Fat Tree Back-to-back butterfly can route all permutations What if you just pick a random mid point?

12 3/14/2011 cs252-S11, Lecture 15 12 Hypercubes Also called binary n-cubes. # of nodes = N = 2 n. O(logN) Hops Good bisection BW Complexity –Out degree is n = logN correct dimensions in order –with random comm. 2 ports per processor 0-D1-D2-D3-D 4-D 5-D !

13 3/14/2011 cs252-S11, Lecture 15 13 Some Properties Routing –relative distance: R = (b n-1 - a n-1,..., b 0 - a 0 ) –traverse ri = b i - a i hops in each dimension –dimension-order routing? Adaptive routing? Average DistanceWire Length? –n x 2k/3 for mesh –nk/2 for cube Degree? Bisection bandwidth?Partitioning? –k n-1 bidirectional links Physical layout? –2D in O(N) spaceShort wires –higher dimension?

14 3/14/2011 cs252-S11, Lecture 15 14 The Routing problem: Local decisions Routing at each hop: Pick next output port!

15 3/14/2011 cs252-S11, Lecture 15 15 How do you build a crossbar?

16 3/14/2011 cs252-S11, Lecture 15 16 Input buffered switch Independent routing logic per input –FSM Scheduler logic arbitrates each output –priority, FIFO, random Head-of-line blocking problem –Message at head of queue blocks messages behind it

17 3/14/2011 cs252-S11, Lecture 15 17 Output Buffered Switch How would you build a shared pool?

18 3/14/2011 cs252-S11, Lecture 15 18 Properties of Routing Algorithms Routing algorithm: –R: N x N -> C, which at each switch maps the destination node n d to the next channel on the route –which of the possible paths are used as routes? –how is the next hop determined? »arithmetic »source-based port select »table driven »general computation Deterministic –route determined by (source, dest), not intermediate state (i.e. traffic) Adaptive –route influenced by traffic along the way Minimal –only selects shortest paths Deadlock free –no traffic pattern can lead to a situation where packets are deadlocked and never move forward

19 3/14/2011 cs252-S11, Lecture 15 19 Example: Simple Routing Mechanism need to select output port for each input packet –in a few cycles Simple arithmetic in regular topologies –ex:  x,  y routing in a grid »west (-x)  x < 0 »east (+x)  x > 0 »south (-y)  x = 0,  y < 0 »north (+y)  x = 0,  y > 0 »processor  x = 0,  y = 0 Reduce relative address of each dimension in order –Dimension-order routing in k-ary d-cubes –e-cube routing in n-cube

20 3/14/2011 cs252-S11, Lecture 15 20 Communication Performance Typical Packet includes data + encapsulation bytes –Unfragmented packet size S = S data +S encapsulation Routing Time: –Time(S) s-d = overhead + routing delay + channel occupancy + contention delay –Channel occupancy = S/b = (S data + S encapsulation )/b –Routing delay in cycles (  »Time to get head of packet to next hop –Contention?

21 3/14/2011 cs252-S11, Lecture 15 21 Store&Forward vs Cut-Through Routing Time:h(S/b +  ) vsS/b + h  OR(cycles): h(S/w +  ) vsS/w + h  what if message is fragmented? wormhole vs virtual cut-through

22 3/14/2011 cs252-S11, Lecture 15 22 Contention Two packets trying to use the same link at same time –limited buffering –drop? Most parallel mach. networks block in place –link-level flow control –tree saturation Closed system - offered load depends on delivered –Source Squelching

23 3/14/2011 cs252-S11, Lecture 15 23 Bandwidth What affects local bandwidth? –packet density:b x S data /S –routing delay:b x S data /(S + w  ) –contention »endpoints »within the network Aggregate bandwidth –bisection bandwidth »sum of bandwidth of smallest set of links that partition the network –total bandwidth of all the channels: Cb –suppose N hosts issue packet every M cycles with ave dist »each msg occupies h channels for l = S/w cycles each »C/N channels available per node »link utilization for store-and-forward:  = (hl/M channel cycles/node)/(C/N) = Nhl/MC < 1! »link utilization for wormhole routing?

24 3/14/2011 cs252-S11, Lecture 15 24 Saturation

25 3/14/2011 cs252-S11, Lecture 15 25 How Many Dimensions? n = 2 or n = 3 –Short wires, easy to build –Many hops, low bisection bandwidth –Requires traffic locality n >= 4 –Harder to build, more wires, longer average length –Fewer hops, better bisection bandwidth –Can handle non-local traffic k-ary n-cubes provide a consistent framework for comparison –N = k n –scale dimension (n) or nodes per dimension (k) –assume cut-through

26 3/14/2011 cs252-S11, Lecture 15 26 Traditional Scaling: Latency scaling with N Assumes equal channel width –independent of node count or dimension –dominated by average distance

27 3/14/2011 cs252-S11, Lecture 15 27 Average Distance but, equal channel width is not equal cost! Higher dimension => more channels ave dist = n(k-1)/2

28 3/14/2011 cs252-S11, Lecture 15 28 Dally Paper: In the 3D world For N nodes, bisection area is O(N 2/3 ) For large N, bisection bandwidth is limited to O(N 2/3 ) –Bill Dally, IEEE TPDS, [Dal90a] –For fixed bisection bandwidth, low-dimensional k-ary n- cubes are better (otherwise higher is better) –i.e., a few short fat wires are better than many long thin wires –What about many long fat wires?

29 3/14/2011 cs252-S11, Lecture 15 29 Dally paper (con’t) Equal Bisection,W=1 for hypercube  W= ½k Three wire models: –Constant delay, independent of length –Logarithmic delay with length (exponential driver tree) –Linear delay (speed of light/optimal repeaters) Logarithmic Delay Linear Delay

30 3/14/2011 cs252-S11, Lecture 15 30 Equal cost in k-ary n-cubes Equal number of nodes? Equal number of pins/wires? Equal bisection bandwidth? Equal area? Equal wire length? What do we know? switch degree: ndiameter = n(k-1) total links = Nn pins per node = 2wn bisection = k n-1 = N/k links in each directions 2Nw/k wires cross the middle

31 3/14/2011 cs252-S11, Lecture 15 31 Latency for Equal Width Channels total links(N) = Nn

32 3/14/2011 cs252-S11, Lecture 15 32 Latency with Equal Pin Count Baseline n=2, has w = 32 (128 wires per node) fix 2nw pins => w(n) = 64/n distance up with n, but channel time down

33 3/14/2011 cs252-S11, Lecture 15 33 Latency with Equal Bisection Width N-node hypercube has N bisection links 2d torus has 2N 1/2 Fixed bisection  w(n) = N 1/n / 2 = k/2 1 M nodes, n=2 has w=512!

34 3/14/2011 cs252-S11, Lecture 15 34 Larger Routing Delay (w/ equal pin) Dally’s conclusions strongly influenced by assumption of small routing delay –Here, Routing delay  =20

35 3/14/2011 cs252-S11, Lecture 15 35 Saturation Fatter links shorten queuing delays

36 3/14/2011 cs252-S11, Lecture 15 36 Discuss of paper: Virtual Channel Flow Control Basic Idea: Use of virtual channels to reduce contention –Provided a model of k-ary, n-flies –Also provided simulation Tradeoff: Better to split buffers into virtual channels –Example (constant total storage for 2-ary 8-fly):

37 3/14/2011 cs252-S11, Lecture 15 37 When are virtual channels allocated? Two separate processes: –Virtual channel allocation –Switch/connection allocation Virtual Channel Allocation –Choose route and free output virtual channel –Really means: Source of link tracks channels at destination Switch Allocation –For incoming virtual channel, negotiate switch on outgoing pin Hardware efficient design For crossbar

38 3/14/2011 cs252-S11, Lecture 15 38 Problem: Low-dimensional networks have high k –Consequence: may have to travel many hops in single dimension –Routing latency can dominate long-distance traffic patterns Solution: Provide one or more “express” links –Like express trains, express elevators, etc »Delay linear with distance, lower constant »Closer to “speed of light” in medium »Lower power, since no router cost –“Express Cubes: Improving performance of k-ary n-cube interconnection networks,” Bill Dally 1991 Another Idea: route with pass transistors through links Reducing routing delay: Express Cubes

39 3/14/2011 cs252-S11, Lecture 15 39 Summary Network Topologies: Fair metrics of comparison –Equal cost: area, bisection bandwidth, etc Routing Algorithms restrict set of routes within the topology –simple mechanism selects turn at each hop –arithmetic, selection, lookup Virtual Channels –Adds complexity to router –Can be used for performance –Can be used for deadlock avoidance TopologyDegreeDiameterAve DistBisectionD (D ave) @ P=1024 1D Array2N-1N / 31huge 1D Ring2N/2N/42 2D Mesh42 (N 1/2 - 1)2/3 N 1/2 N 1/2 63 (21) 2D Torus4N 1/2 1/2 N 1/2 2N 1/2 32 (16) k-ary n-cube2nnk/2nk/4nk/415 (7.5) @n=3 Hypercuben =log Nnn/2N/210 (5)


Download ppt "CS252 Graduate Computer Architecture Lecture 15 Multiprocessor Networks March 14 th, 2011 John Kubiatowicz Electrical Engineering and Computer Sciences."

Similar presentations


Ads by Google