Files
MPIonCell/documentation/developer/html/performance.html
T
2017-10-26 19:57:24 +02:00

65 lines
4.9 KiB
HTML
Executable File

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>MPI On Cell (Documentation): Performance Measurements</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="main.html">MPI On Cell</a>
</div>
</div>
<div class="contents">
<h1><a class="anchor" name="performance">Performance Measurements </a></h1>The measurements were taken on a Playstation 3 running Yellow Dog Linux release 6.0 using Cell SDK 3.1.<p>
To measure send-receive operations ping-pongs were used and to measure DMA-calls the time till the used DMA-tag is marked to have no pending calls is used. The stated latencies in the pictures above are one-way latencies.<h2><a class="anchor" name="perf_send_recv">
Send-Receive performance</a></h2>
The following two figures show latency and bandwidth achieved by our implementation. The theoretical maximum bandwidth is 25 GByte/s and synchronous send between SPUs is at a close range to this limit if the data-size is large enough. There is also a big difference between SPU-SPU and SPU-PPU operations. The reason for this is the fact that the PPU cannot handle DMA-operations itself but only remote-control the SPU's Memory Flow Controller. And as you will see later the main-memory performance of the PPU is much lower than that of the SPUs. Because we use ping-pongs there is no way to determine differences in sending from or to the PPU, but other measurements indicate such differences.<p>
<div align="center">
<img src="latency-kb.png" alt="latency-kb.png">
</div>
<p>
<div align="center">
<img src="bandwidth-kb.png" alt="bandwidth-kb.png">
</div>
<p>
The following figure shows the latency of send-receive operations at a lower scale than the first figure. If you look at the latency of synchronous send operations then you can see that there is a big start-up latency and only a very small data-size dependend latency. So there's only a very small time-difference between sending 10 byte and 1 Kbyte, but there is naturally a difference in throughput.<p>
<div align="center">
<img src="latency-b.png" alt="latency-b.png">
</div>
<h2><a class="anchor" name="perf_moc_vs_dma">
Send-Recv vs. DMA performance</a></h2>
The following two figures demonstrate the difference in performance of send-recv operations and DMA-calls. The performance of DMA-calls reaches it's peak much earlier than send-recv and the peak-value is higher than that of send-recv even though the difference is not much. So DMA is a lot faster than send-recv especially for small messages, but for big messages the difference is much lower. It seems that it is always better to use DMA, but keep in mind that in practical applications calculation time easily exceeds communication time.<p>
<div align="center">
<img src="dma-vs-moc-lat.png" alt="dma-vs-moc-lat.png">
</div>
<p>
<div align="center">
<img src="dma-vs-moc-bw.png" alt="dma-vs-moc-bw.png">
</div>
<h2><a class="anchor" name="perf_spu_vs_ppu">
SPU- vs PPU-initiated transfer</a></h2>
The following figure shows the difference between SPU- and PPU-initiated DMA-calls. As you can see the highest performance can be achieved by using SPU-SPU DMA-calls. There is also hardly any difference between put and get operations. DMA-operations between SPU and main-memory achieves lower performance and there is a difference between put and get operations. PPU to SPU DMA calls have the lowest performance with small transfer sizes, but if the transfer-size is big enough they are faster than SPU-main-memory transfers. The lowest performance has a memcopy on the PPU, which also explains the bad performance of buffered send between SPU and PPU.<p>
<div align="center">
<img src="spu-ppu-dma-bw-kb.png" alt="spu-ppu-dma-bw-kb.png">
</div>
<h2><a class="anchor" name="perf_mem">
DMA vs. memcpy</a></h2>
The official Cell documentation states that it is also possible to use memcpy to transfer data from the PPU to a SPU. However one should use DMA, because it is always faster. If you look at the following figure, this is not always true. If the data-size is small enough memcpy is faster.<p>
<div align="center">
<img src="ppu-transfer-bw-b.png" alt="ppu-transfer-bw-b.png">
</div>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:50:43 2009 for MPI On Cell (Documentation) by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>