I am a little confused which of the two laws above i should use:

Suppose I have a computer program that can be parallelized by 70%. 30% cannot be parallelized. Every single data (100% of data) will pass the parallelizable part and also pass the non-parallelizable part.

I want to calculate how much more data i can process in a fixed amount of time if i use 2 processors instead of 1 processor.

My thinking is that since the 30% doesn't change when I increase the data, the total time spent in the non-parallelizable part will increase. Therefore, I would guess I have to use Amdahl's Law.

I think Gustafson's Law is used when the total time spent in the non-parallelizable part is constant, therefore the parallism will go up.

I cannot find a solution to this since usually Gustafson's Law is related to problems where the time is fixed and you have to find the amount of data that can be processed for given number of processors. But this case might be different?

  • 1
    $\begingroup$ Gustafson's Law assumes that parallelism increases as the size of the data set increases (which often applies to certain HPC problems). Your problem defines the amount of parallelism as constant. $\endgroup$ – Paul A. Clayton Mar 6 '15 at 11:57
  • $\begingroup$ So amdahl's law would be the one to use? $\endgroup$ – NoMorePen Mar 6 '15 at 12:03
  • $\begingroup$ If I use Gustafson's Law and increase the number of processors approaching infinity, the amount of data I can process in a given time also approaches infinity, that does make no sense here does it? $\endgroup$ – NoMorePen Mar 6 '15 at 14:59
  • $\begingroup$ @PaulA.Clayton Make an answer? $\endgroup$ – Raphael Mar 6 '15 at 17:54
  • $\begingroup$ Okay I just was not sure. Because i had this question in an exam and the TA would not believe me that we cannot use the Gustafson's Law. But can I use Amdahl's Law here? $\endgroup$ – NoMorePen Mar 6 '15 at 17:58

The difference between Amdahl’s Law and Gustafson’s Law lies basically in the application’s objectives, whether to make the application run faster with the same problem size or run the application in the same time with increasing problem size.

Gustafson’s approach introduces time constraints taking the execution time as a constant, therefore the parallel and the non-parallel executed time are considered as constants.



I finally found the solution and I want to share it with you,

The solution is that you have to use Amdahl's Law. Iff 30% of time is sequential you should use Gustafson's Law.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.