Topology
(what)
physical interconnection structure of the network graph direct: node connected to every switch indirect: nodes connected to specific subset of switches
Chapter 4
Routing Algorithm
(which)
Interconnection Networks
Nguyen Kim Khanh
Department of Computer Engineering School of Information and Communication Technology Hanoi University of Science and Technology
restricts the set of paths that msgs may follow many algorithms with different properties deadlock avoidance?
Switching Strategy
how data in a msg traverses a route circuit switching vs. packet switching
(how) (when)
when a msg or portions of it traverse a route what happens when traffic is encountered?
11/1/2010
IT6030
Formalism
network is a graph V = {switches and nodes} connected by communication channels C V V Channel has width w and signaling rate f = 1/
channel bandwidth b = wf phit (physical unit) data transferred per cycle flit - basic unit of flow-control
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
Number of input (output) channels is switch degree Sequence of switches and links followed by a message is a route Think streets and intersections
11/1/2010
IT6030
11/1/2010
IT6030
IT6030
Interconnection Topologies
Class of networks scaling with N Logical Properties:
distance, degree
Physical properties
length, width
Linear Array
Diameter? Average Distance? Bisection bandwidth? Route A -> B given by relative address R = B-A
2D Grid
3D Cube 2D Torus
n-dimensional array
N = kn-1 X ...X kO nodes described by n-vector of coordinates (in-1, ..., iO)
6x3x2
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
11/1/2010 IT6030 8
IT6030
Trees
Fat-Trees
Fat Tree
Fatter links (really more of them) as you go up, so bisection BW scales with N
Butterflies
4 3 2 1 0
16 node butterfly
0 1 0 1 0 1 0 1
building block
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 ri=0, otherwise cross edge Bisection N/2 vs N (n-1)/n (for n-cube)
11/1/2010
IT6030
11
11/1/2010
IT6030
12
IT6030
Hypercubes
Also called binary n-cubes. # of nodes = N = 2n. O(logN) Hops Good bisection BW Complexity
Out degree is n = logN correct dimensions in order with random comm. 2 ports per processor
Back-to-back butterfly can route all permutations What if you just pick a random mid point?
0-D 1-D 2-D 3-D 4-D
5-D ! 14
11/1/2010
IT6030
13
11/1/2010
IT6030
Some Properties
Routing
relative distance: R = (b n-1 - a n-1, ... , b0 - a0 ) traverse ri = b i - a i hops in each dimension dimension-order routing? Adaptive routing?
Average Distance
n x 2k/3 for mesh nk/2 for cube
Wire Length?
Cross-bar
Partitioning?
Physical layout?
2D in O(N) space higher dimension? Short wires
11/1/2010
IT6030
15
11/1/2010
IT6030
16
IT6030
Io
I1
I2
R0 R1
O0
Output Ports
I1
Oi O2
R2 R3
Cross-bar
I2
O3
Scheduling
I3
phase
Io I1 I2 I3
11/1/2010
IT6030
Output Ports R1
Output Ports R2
Deterministic
Output Ports R3 Control
Adaptive
route influenced by traffic along the way
Minimal
Deadlock free
no traffic pattern can lead to a situation where packets are deadlocked and never move forward
11/1/2010
IT6030
19
11/1/2010
IT6030
20
IT6030
Communication Performance
Routing and Control Header Error Code Trailer Data Payload
digital symbol
Routing Time:
Time(S)s-d = overhead + routing delay + channel occupancy + contention delay Channel occupancy = S/b = (Sdata+ Sencapsulation)/b Routing delay in cycles (): Time to get head of packet to next hop Contention?
21 11/1/2010 IT6030 22
11/1/2010
IT6030
Contention
Most parallel mach. networks block in place Time: h(S/b + /) OR(cycles): h(S/w + ) vs vs S/b + h / S/w + h
link-level flow control tree saturation
Closed system - offered load depends on delivered what if message is fragmented? wormhole vs virtual cut-through
11/1/2010 IT6030 23 11/1/2010
Source Squelching
IT6030 24
IT6030
Bandwidth
Saturation
80
0.8
Delivered Bandwidth
70 60
Latency
50 40
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?
11/1/2010 IT6030 25
Saturation
30 20 10 0 0 0.2 0.4 0.6 0.8 1
Saturation
0.3 0.2 0.1 0 0 0.2 0.4 0.6 0.8 1 1.2
Delivered Bandwidth
Offered Bandwidth
11/1/2010
IT6030
26
150
n >= 4
Harder to build, more wires, longer average length Fewer hops, better bisection bandwidth Can handle non-local traffic
100
50
11/1/2010
IT6030
27
11/1/2010
IT6030
28
IT6030
Average Distance
100 90 80 70 Ave Distance 60 50 40 30 20 10 0 0 5 10 15 20 25 256 1024 16384 1048576
Equal number of nodes? Equal number of pins/wires? Equal bisection bandwidth? Equal area? Equal wire length?
Dimension
but, equal channel width is not equal cost! Higher dimension => more channels
11/1/2010 IT6030 29
What do we know? switch degree: n diameter = n(k-1) total links = Nn pins per node = 2wn bisection = kn-1 = N/k links in each directions 2Nw/k wires cross the middle
11/1/2010 IT6030 30
200
16384
200
150
150
100
100
100
50
50
50
0
0 0 5 10 15 20 25
0 0 5 10 15 20 25 0 5 10 15 20 25
Dimension
Dimension (n)
Dimension (n)
total links(N) = Nn
11/1/2010 IT6030 31 11/1/2010
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
IT6030 32
IT6030
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!
Dimension (n)
Dimension (n)
Saturation
250
200
50
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
IT6030
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 Do not need to add links, or xbar, only buffer resources
11/1/2010 IT6030 37 11/1/2010 IT6030 38
Deadlock Freedom
How can deadlock arise?
necessary conditions: shared resource incrementally allocated non-preemptible channel is a shared resource that is acquired incrementally source buffer then dest. buffer channels along a route
Consider Trees
Important assumption:
Destination of messages must always remove messages
11/1/2010
IT6030
40
IT6030
-X
+X
-Y
Performance?
Some numberings and routes much better than others interacts with topology in strange ways
XY routing forbids 4 of 8 turns and leaves no room for adaptive routing Can you allow more turns and still be deadlock free?
41 11/1/2010 IT6030 42
11/1/2010
IT6030
-x
+x
West-first
north-last
-y
negative first
Can route around failures or congestion Can combine turn restrictions with virtual channels
43 11/1/2010 IT6030 44
11/1/2010
IT6030
IT6030
find a numbering of channel resources such that every legal route follows a monotonic sequence no traffic pattern can lead to deadlock
network need not be acyclic, just channel dependence graph
11/1/2010 IT6030 45
11/1/2010
IT6030
46
More examples:
What about wormhole routing on a ring?
2 1 0 7 4 5 6
1 00 18 10 17 20 16 30 19 31 18 21 2 17 11 01
2 02 1 12
3 03 0 13
18 17
3
18 17
22
23
32
33
16 19
11/1/2010
IT6030
47
11/1/2010
IT6030
48
IT6030
Can improve utilization of the network Simple deterministic algorithms easily run into bad permutations
fully/partially adaptive, minimal/non-minimal can introduce complexity or anomalies little adaptation goes a long way!
49 11/1/2010 IT6030 50
11/1/2010
IT6030
Virtual Network Use VCs to avoid deadlock 1 level for each wrap-around Virtual Network 1
IT6030 51 11/1/2010 IT6030
Virtual Network 2
52
IT6030
Summary #1
Network Topologies:
Topology 1D Array 1D Ring 2D Mesh 2D Torus Degree Diameter 2 2 4 4 N-1 N/2 2 (N1/2 - 1) N1/2 nk/2 Ave Dist N/3 N/4 2/3 N1/2 1/2 N1/2 nk/4 n Bisection 1 2 N1/2 2N1/2 nk/4 n/2 63 (21) 32 (16) 15 (7.5) @n=3 N/2 10 (5) D (D ave) @ P=1024 huge
n =log N
11/1/2010
IT6030
54
Summary #2
Routing Algorithms restrict the 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
IT6030