This post contains a link to a presentation on how to optimize Streams applications. The 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.

4 Comments on "Optimizing Streams Applications"

  1. Kmell Van Hellsing September 08, 2014

    WOOO. Thank you very much for this tips.

  2. Scott, thanks a trillion for this brilliant presentation. It makes total sense and is well authored !!

  3. Stephan_Reimann February 12, 2015

    great presentation, thanks a lot. Extremly helpful

  4. The LSCPUs tool listed in Lesson 5 (under BottleNecks) can be downloaded here:
    https://github.com/IBMStreams/streamsx.utility/tree/master/lscpus

Join The Discussion