Difference between revisions of "ThreadScope Tour/SparkOverview"

From HaskellWiki
Jump to navigation Jump to search
Line 8: Line 8:
   
 
= Spark viewer features =
 
= Spark viewer features =
  +
  +
Review spark creation and creation rates:
   
 
[[Image:ThreadScope-spark-creation-conversion.png|400px|spark creation/conversion]]
 
[[Image:ThreadScope-spark-creation-conversion.png|400px|spark creation/conversion]]
  +
  +
Track the size of the spark pool:
   
 
[[Image:ThreadScope-spark-pool.png|400px|spark pool]]
 
[[Image:ThreadScope-spark-pool.png|400px|spark pool]]
  +
  +
See the distribution of sparks grouped by their sizes:
   
 
[[Image:ThreadScope-spark-size-focus.png|400px|spark size histogram]]
 
[[Image:ThreadScope-spark-size-focus.png|400px|spark size histogram]]

Revision as of 16:37, 7 December 2011

ThreadScope and sparks

ThreadScope 0.2.1 and higher come with spark event visualisations that help you to understand not just what behaviours your parallel program is exhibiting (eg. not using all cores) but why.

It helps to know a bit about sparks:

spark lifecycle

Spark viewer features

Review spark creation and creation rates:

spark creation/conversion

Track the size of the spark pool:

spark pool

See the distribution of sparks grouped by their sizes:

spark size histogram

Things to look for

The combination of features can be used to look for some common problems such as

  1. Too few sparks (not enough parallelism)
    • spark pool hits empty
    • low spark creation rate
  1. Too many sparks
    • overflow (red) is wasted work
    • can cause catastrophic loss of parallelism
  1. Too many duds or fizzled sparks (grey)
  2. Too many sparks get GC'd (orange)
  3. Sparks too small (overheads too high)
  4. Sparks too big (load balancing problems TODO : link to Sudoku

In the following sections we will walk through some examples of attempts to diagnose these problems.