Home > Software design >  Why my parallel Program is showing such behaviour
Why my parallel Program is showing such behaviour

Time:07-09

I am trying to run my parallel program on machine with 32 core and 4 threads context and in my speed up graph why I am having so many zigzags?

Image File

CodePudding user response:

It is not possible to say without doing a detailed analysis of your application ... and the platform that you are running it on. In general, there are all sorts of things that can cause "jittery" performance measurements.

However, the overall curve is consistent with typical speedup behavior in parallel code. Increasing the number of workers gives you close to linear speedup until you reach a threshold ... that typically relates to the number of available cores. The performance can go no higher. Indeed, if you keep increasing the number of workers, various resource contention effects can cause the overall performance to drop.

(I have no idea what "fastflow" vs "threads" means on your graph, or whether that is relevant to your question.)

CodePudding user response:

The drop around 32 is normal if you have 32 compute units.

If you have more active threads than there are compute units, you will often see the threads move from one core to another, and this causes cache misses.

You are doing the right thing, though: Always measure. Do not just assume that an optimization will make your code faster. Instead show it by measuring the speedup.

  • Related