Performance Analysis Flashcards
What is speedup?
S_p(n) = T_s(n)/ T_p(n)
A measure of how much faster a program runs on parallel compared to serial.
What is cost?
C_p(n) = pT_p(n)
Measure of total amount of work performed by all processors
What is efficiency?
E_p(n) = S_p(n)/p = T_s/(pT_p)
In ideal case it should equal 1
What is the effect of overhead?
- Cost will be be more than serial run time
- Speedup will be less than p
- Efficiency will be less than 1
How does overhead affect parallel run time and efficiency?
T_p = T_s/p + T_overhead
Efficiency decreases as number of processes increases as there is more overhead from each process.
What does the parallel runtime comprise of?
- Local computation runtime
- Runtime of the exchange of data between processors
- Runtime of the synchronisation of the processors when accessing shared data
- Waiting time due to unequal load distribution / waiting to access shared data
What is Amdahl’s Law?
When a fraction r of a parallel program must be executed sequentially then the speedup is:
S_p = 1/(r + (1-r)/p)
Which will always be <= 1/r
What is scalability? What does it mean for a program to be scalable?
Scalability captures the performance behaviour for an increasing number of processors.
A program is scalable if the efficiency remains constant if the number of processors and the problem size are increased
What is a limitation of Amdahl’s Law?
The law cannot capture the increase in speedup for increasing problem size
What is Gustafson’s Law?
The behaviour of the special case that the sequential program part has a constant execution time.
Let the constant execution time be c, and t_p(n,p) be be the execution time of the parallelizable part of the program.
S_p = (c + t_p(n,1))/(c + t_p(n,p))
If the parallel part is perfectly parallelizable then t_p(n,p) = (T_s - c)/p
What is the difference between strongly scalable and weakly scalable?
If the efficiency stays constant when increasing the number of processors -> strongly scalable
If the efficiency stays constant when both the number of processors and the problem size increase -> weakly scalable