Speedup Amdahl Gustafson Flashcards
What is scalability in prallel programming?
- speedup when we increase number of processors
- what happens if we have infite processors
- linear speed up is the wish
Define parallel Speedup.
Speedup Sp on p CPU’S –> Sp = T1/Tp
(informally: time on one processor / time on p processors)
Define Efficiency with Sp and p.
Efficiency: Sp / p
(informally: Speedup / number of processors)
Why is Sp < p in the normal case?
Means that the speedup is not linear to the amount of processors.
- Programs may not contain enough parallelism
- overheads introduced by parallelization
- architectural limitations
Assume Parallel program:
- sequential part: 20%
- parallel part: 80% (assume it scales linearly)
- T1 = 10
see picture
Formula for Efficiency
Ep = Sp / p
Formula Speedup
Sp = T1 / Tp
Gives the ingrediants to Amdahl’s Law. First define Sp without using f. Thand use f as non parallizible part.
Amdahls law gives a bound on speedup.
Speedup is Sp := T1 / Tp
T1 := Wser + Wpar (W for work)
Tp ≥ Wser + (Wpar / P) (P number of processors)
Hence we have:
Sp ≤ (Wser + Wpar) / (Wser + (Wpar / P))
NOW using f for nonparallizible part:
Wser = f\*T1 Wpar = (1-f)\*T1
Sp ≤ 1 / (f + ( (1-f) / P)
Give Amdahls Law formula.
First for Wser than for Wpar and than for Sp using f.
Wser = f\*T1 Wpar = (1-f)\*T1
Sp ≤ 1 / (f + ( (1-f) / P)
What is a takeaway of Amdahls Law
all non- parallel parts of a program (no matter how small) can cause problems for scalability
What is the difference to Amdahls Law using Gustafsons Law? IMPORTANT
The time stays the same when thinking about Gustafsons Law.
Even if more processors are used the runtime stays the same.
More processors allow to solve larger problems in the same time.
What is the formula to Gustafsons Law. Give Sp
f := sequential part
Sp = f + p( 1 - f) = p - f ( p - 1 )
Which law is used when talking about the pessimistic case?
Admhahl’s Law
Which law is used when talking about the optimistic case?
Gustafson’s Law
Which law is used when talking about constant work?
Amdahl’s Law