Cloud Pak for Data Group

Manually Optimizing Streams Applications 

Mon September 28, 2020 03:59 PM

Since IBM Streams v4.2, Streams applications are automatically optimized using the automatic fusion and threading features.


However, if you would like to manually optimize your applications, this post is a guide to doing so. It includes a link to a presentation on how to manually optimize Streams applications.  It is also of interest to anyone who would like to have a better understanding of how the SPL runtime works internally.

The attached slides are meant to be presented, but they were written with enough context so that they should be understandable on their own. There have been several requests to make these generally available.

 

The slides present and explain the following performance lessons:

  1. Compile with -a
  2. Fuse operators into the same PE to reduce communication costs.
  3. Insert threaded ports into PEs to increase throughput through pipeline parallelism.
    1. Prefer threaded ports over PEs to obtain pipeline parallelism.
  4. Use multiple PEs in an application to take advantage of multiple hosts.
  5. Use one PE per host.
    1. If there are two PEs on the same host, they should probably be fused into one PE. Insert threaded ports to regain parallelism.
  6. Improve the performance of bottlenecks to improve the throughput of an application.
    1. Trying to improve the performance of an application without knowing who is the bottleneck is a waste of time.
    2. When a parallel region is no longer the bottleneck, further parallelism will not help.
  7. Know your hardware. Distribute PEs to hosts so as to avoid over-subscribing any resource (cores, memory, disk, etc.) on that host.

Statistics

0 Favorited
7 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
pdf file
optimizing-streams-applications.pdf   3.09MB   1 version
Uploaded - Mon September 28, 2020