ganler / ResearchReading

General system research material (not limited to paper) reading notes.
GNU General Public License v3.0
20 stars 1 forks source link

[Lecture] Performance Scaling #29

Closed ganler closed 4 years ago

ganler commented 4 years ago

https://www.archer.ac.uk/training/course-material/2016/12/mpi_scaling_manc/Slides/Scaling.pdf

ganler commented 4 years ago

Performance Metric

Only for homogenous devices. (The first 2 chapters in DAO)

Scaling

Strong Scaling: total problem size stays the same as the number of processors increases

Weak Scaling: the problem size increases at the same rate as the number of processors, keeping the amount of work per processor the same

The serial section of code

“The performance improvement to be gained by parallelisation is limited by the proportion of the code which is serial.” -- Gene Amdahl, 1967

Amdahl's Law

Speed-up ratio = T_before / T_after = (T_seq + T_p) / (T_seq + T_p / N) = 1 / (a + (1-a) / N)

Undergrad courses teach this.

Gustafson's Law

The prerequisite of Amdahl's law is that the dataset volumn is fixed which is absolutely uncommon.

Gustafson's Law uncovers that with larger amount of dataset, the speed-up ratio grows(still limited by the upper bound).

let a_seq = t_seq / (t_seq + t_par) s = (t_seq + N * t_par) / (t_seq + t_par) = a_seq + N x a_par

Gustafson's Law assumes that a_seq is fixed. Therefore to increase s, we must increase either N or a_par.

Quantifying load imbalance

Load imbalance factor

LIF = max load / avg load