• No results found

communicationcostfinal

N/A
N/A
Protected

Academic year: 2020

Share "communicationcostfinal"

Copied!
31
0
0

Loading.... (view fulltext now)

Full text

(1)

Communication Costs

in Parallel Machines

Along with idling and contention, communication is a

major overhead in parallel programs.

The cost of communication is dependent on a variety of

(2)

Message Passing Costs in

Parallel Computers

The total time to communicate a message over a network is the sum of the time to prepare a message for transmission and the time taken by the message to traverse the network to its destination.

The parameters involved are as following:

1. Startup time (ts): Time spent at sending and receiving nodes .This includes the time

• to prepare the message (adding header, trailer, and error correction information),

• the time to execute the routing algorithm, and

• the time to establish an interface between the local node and the router.

(3)

Message Passing Costs in

Parallel Computers

(4)

Message Passing Costs in

Parallel Computers

3. Per-word transfer time (tw): If the channel bandwidth is r words per second, then each word takes time

tw = 1/r

to traverse the link. This time is called the per-word transfer time. This time includes network as well as buffering overheads. This time includes all overheads that

(5)

Store-and-Forward Routing

A message traversing multiple hops is completely

received at an intermediate hop before being forwarded to the next hop.

The total communication cost for a message of

size m

words to traverse l communication links is

• In most platforms, th is small and the above expression

(6)

Routing Techniques

Passing a message from node P0 to P3 (a) through a store-and-

forward communication network; (b) and (c) extending the

concept to cut-through routing. The shaded regions represent the time that the message is in transit. The startup time associated

(7)

Packet Routing

Store-and-forward makes poor use of communication

resources.

Packet routing breaks messages into packets and

(8)

Packet Routing

Advantages:

Lower overhead from packet loss (errors), Possibility of packets taking different paths, and better error correction capability.

For these reasons, this technique is the basis for long-haul communication networks

Overheads:

(9)

Packet Routing

Consider the transfer of an m word message through the network.

Startup time ts .

The message is broken into packets, and packets are

assembled with their error, routing, and sequencing fields. The size of a packet is now given by r + s,

where r is the original message and s is the additional information carried in the packet.

(10)

Packet Routing

(11)

Cut-Through Routing

Takes the concept of packet routing to an extreme by

further dividing messages into basic units called flits.

Since flits are typically small, the header information

must be minimized.

This is done by forcing all flits to take the same path, in

sequence.

Error checks are performed on the entire message, as

opposed to flits.

No sequence numbers are needed.

A tracer message first programs all intermediate routers.

(12)

Cut-Through Routing

• As soon as a flit is received at an intermediate node, the flit is passed on to the next node.

• The total communication time for cut-through routing is approximated by:

• This is identical to packet routing, however, tw is

typically much smaller.

(13)

Cut-Through Routing

(14)

Simplified Cost Model for

Communicating Messages

The cost of communicating a message between two

nodes l hops away using cut-through routing is given by

• In this expression, th is typically smaller than ts and tw. For this reason, the second term in the RHS does not show, particularly, when m is large.

• Furthermore, it is often not possible to control routing and placement of tasks.

(15)

Simplified Cost Model for

Communicating Messages

Since the maximum number of hops (l) in most networks is relatively small, the per-hop time can be ignored with little loss in accuracy.

(16)

Simplified Cost Model for

Communicating Messages

It is important to note that the original expression for

communication time is valid for only uncongested networks.

If a link takes multiple messages, the corresponding

tw

term must be scaled up by the number of messages.

Different communication patterns congest different

networks to varying extents.

It is important to understand and account for this in the

(17)

Cost Models for

Shared Address Space Machines

While the basic messaging cost applies to these machines as well, a number of other factors make accurate cost modeling more difficult.

(18)

Cost Models for

Shared Address Space Machines

2.Finite cache sizes can result in cache thrashing:

(19)

Cost Models for

Shared Address Space Machines

3. Overheads associated with invalidate and update operations are difficult to quantify:

(20)

Cost Models for

Shared Address Space Machines

4. Spatial locality is difficult to model: Since cache lines are generally longer than one word (anywhere from four to 128 words), different words might have different access latencies associated with them even for the first access. Accessing a neighbor of a previously fetched

(21)

Cost Models for

Shared Address Space Machines

(22)

Cost Models for

Shared Address Space Machines

6. False sharing and contention are difficult to model: Two words used by (threads executing on) different processor may reside on the same cache line. This may

cause coherence actions and communication overheads, even though none of the data might be shared. The programmer must adequately pad data structures used by various processors to minimize false sharing.

(23)

Routing Mechanisms

for Interconnection Networks

(24)

Routing Mechanisms

for Interconnection Networks

Routing mechanisms can be classified as minimal or non-minimal.

Minimal routing mechanism always selects one of the shortest paths between the source and the destination. In a minimal routing scheme, each link brings a message closer to its destination, but the scheme

an lead to congestion in parts of the network.

(25)

Routing Mechanisms

for Interconnection Networks

Routing mechanisms can also be classified on the basis of how they use information regarding the state of the network.

Deterministic routing scheme determines a unique path for a message, based on its source and destination. It does not use any information regarding the state of the network. Deterministic schemes may result in uneven use of the communication resources in a network.

Adaptive routing scheme uses information regarding

(26)

Routing Mechanisms

for Interconnection Networks

One commonly used deterministic minimal routing technique is called dimension-ordered routing. Dimension-ordered routing assigns successive channels for traversal by a message based on a numbering scheme determined by the dimension of the channel.

(27)

XY Routing

(28)

XY Routing

Let PSy,Sx represent the position of the source node and

PDy,Dx represent that of the destination node. Any minimal routing scheme should return a path of length |Sx

- Dx| + |Sy - Dy|. Assume that Dx Sx and Dy Sy. In the XY-routing scheme, the message is passed through intermediate nodes PSy,Sx+1, PSy,Sx+2, ..., PSy,Dx

along the X dimension and then through nodes PSy+1,Dx,

PSy+2,Dx, ..., PDy,Dx along the Y dimension to reach the destination. Note that the length of this path is indeed

(29)
(30)

E-Cube Routings

Consider the three-dimensional hypercube Let Ps = 010 and Pd = 111

represent the source and destination nodes for a message. Node Ps computes

010 111 = 101 [Number of one bits in result indicate distance between source and Destination]

In the first step, Ps forwards the message along the dimension corresponding to the least significant bit to node 011.

Node 011 sends the message along the dimension corresponding to the most significant bit

(011 111 = 100).

(31)

Routing Mechanisms

for Interconnection Networks

Routing a message from node Ps (010) to node Pd (111) in a three-

References

Related documents