Docsity

Routing Embeddings - Parallel Computing - Lecture Slides, Slides of Parallel Computing and Programming

Partial preview of the text

Download Routing Embeddings - Parallel Computing - Lecture Slides and more Slides Parallel Computing and Programming in PDF only on Docsity!

Parallel Computing Platforms

Routing, Network Embedding

2 Topics for Today

  • Routing —cost models for communication —routing strategies —example network fabric: Infiniband
  • Network embeddings

4 Message Passing Costs

Three components of transfer time

  • Startup time^ ( ts ) —time spent at sending and receiving nodes - overhead of executing network protocol code within the OS - context switches to move in/out of kernel mode to send/receive data - copying of data between the user level buffers and the NIC memory
  • Per-hop time^ ( th ) — includes switch latencies, network delays, and other factors
  • Per-word transfer time^ ( tw ) —includes all overheads proportional to message length - includes bandwidth of links, error checking and correction, etc.

- Definition

— an intermediate hop completely receives a multi-

hop message before forwarding it to the next hop

- Total communication cost for

— message of size m words

— traverse l communication links

- Typically,^ th **is small

  • Thus, approximate store and forward message cost as** 5 Store-and-Forward Routing

7 Cut-through Routing

  • Packet routing in the extreme —divide messages into basic units called flits —start forwarding flit before it is received in its entirety - typically, after seeing the destination address in the first few bytes - pass along even bad packets: requires end-to-end error checking
  • Flits are typically small^ →^ header information must be small
  • To enable small headers —force all flits to take the same path, in sequence - tracer message first programs all intermediate routers - all flits then take same route —perform error checks on the entire message - not separately on flits - no sequence numbers needed
  • Used in today’s Infiniband networks

8 Cut-through Routing

**- Communication time for cut-through routing is

  • Identical in form to packet routing** — however,^ tw much smaller
  • Typically,^ th smaller than^ ts and^ tw — second RHS term is insignificant when m is large
  • Approximate the cost of communication using cut-though

routing transfer by

10 Cost Models for Shared Address Space Machines

Accurate cost model for shared memory comm is difficult

  • Memory layout is typically determined by the system
  • Finite cache sizes can result in cache thrashing —additional traffic because of failure to exploit close reuse
  • Difficult to quantify overheads for coherence traffic —especially for multi-level caches with some shared levels
  • Difficult to model —spatial locality —false sharing and contention
  • Prefetching can reduce exposed latency for data accesses

11 Routing Variants

  • Method for choosing a path —oblivious: unique path between source and destination - determines route for each pair without considering traffic - appeal: can be computed in advance, even if they are computationally expensive optimal deterministic routing (with a minimal edge-forwarding index) in arbitrary networks is NP-hard [Saad ’93] —adaptive: use info about network state to determine path - must react quickly to changes in the global network - often constrained to fast suboptimal algorithms
  • Path characteristics —minimal: shortest path between source and destination —non-minimal: may use longer path to avoid congestion

13 Dimension-ordered Routing Routing a message from node Ps ( 010 ) to node Pd ( 111 ) in a 3D hypercube using dimension-ordered routing

14 Routing Costs: Theory vs. Practice

  • Point-to-point metrics (bandwidth, latency) are not accurate

predictors for average network bandwidth

  • Widely-used aggregate theoretical metrics —edge-forwarding index: max # of paths through any edge —bisection bandwidth
  • Practical techniques to increase performance —multiple transmission channels —operating system bypass
  • Optimized routing offers substantial benefits —Infiniband: for some traffic patterns, congestion degrades bandwidth by 6.5x and increases latency 5x —can characterize routing algorithms by “effective bisection bandwidth”

Infiniband Routing

  • Oblivious destination-based distributed routing
  • Each switch has a forwarding table (random or linear) —defines which port leads to which endpoint —on startup or after topology changes - Subnet Manager (SM) discovers the topology - computes the forwarding tables for each switch - uploads them to the switches
  • Credit-based flow control scheme in hardware —goal: avoid packet loss at congested switches —how: each output port can only send packets if it has credits at the destination input port 16

Infiniband OpenSM Routing Algorithms

- MINHOP —minimal paths among all endpoints; tries to balance the number of routes per link locally at each switch (under the constraint of minimal routes) **—can be circular dependencies among the switch buffers (admits deadlock)

  • UPDN** —uses the Up/Down routing algorithm to avoid circular buffer** **dependencies by restricting # of possible paths in the network
  • FTREE** —a routing scheme optimized for fat trees; deadlock-free, but requires a fat **tree network topology
  • DOR (Dimension Order Routing)** —routes along the dimensions of a k-ary n-cube to determine shortest **paths and might create circular buffer dependencies
  • LASH (Layered Shortest Path)** —uses Virtual Lanes (VL) to break cyclic dependencies among channels of an underlying DOR scheme 17

Computing Routes with P-SSSP

VP set of endpoints

VC set of crossbars

19

P

-SSSP 20 P-SSSP 19 P^2 -SSSP P-SSP: only updates weights P times P 2 -SSSP: more accurate greedy heuristic to minimize the edge-forwarding index: perform the SSSP for each source- destination pair and update the edge weights P(P − 1) times (one for each pair of endpoints)