Performance metrics
How is my parallel code performing and scaling?
Performance metrics How is my parallel code performing and scaling? - - PowerPoint PPT Presentation
Performance metrics How is my parallel code performing and scaling? Performance metrics A typical program has two categories of components - Inherently sequential sections: cant be run in parallel - Potentially parallel sections ( ) ) = T
How is my parallel code performing and scaling?
where N is the size of the problem and P the number of processors
2
S N, P
( ) = T N,1 ( )
T N,P
( )
E N,P
( ) = S N,P ( )
P = T N,1
( )
P T N,P
( )
E N
( ) = Tbest N ( )
T N,1
( )
S N,P
( ) < P
E N,P
( ) <1
E N
( ) <=1
changes as the number of processors is increased
number of processors, keeping the amount of work per processor the same
to achieve than weak scaling
3
4
50 100 150 200 250 300 50 100 150 200 250 300 Speed-up No of processors
Speed-up vs No of processors
linear actual
5 2 4 6 8 10 12 14 16 18 20 1 n Actual Ideal
Runtime (s)
“The performance improvement to be gained by parallelisation is limited by the proportion of the code which is serial” Gene Amdahl, 1967
6
7
T N,P
( ) =a T N,1 ( )+ 1-a ( ) T N,1 ( )
P S N,P
( ) = T N,1 ( )
T N,P
( )
= P aP + 1-a
( )
a
a = 0 a = 0.1 a = 0.1 1/a
less important
8
9
E P,P
( ) = a
P + 1-a
( )
S P,P
( ) =a + 1-a ( ) P
S N, P
( ) = T N,1 ( )
T N,P
( )
= a + 1-a
( ) N
a + 1-a
( ) N
P T N,P
( )
= Tserial N,P
( )+Tparallel N, P ( )
=a T 1,1
( )+ 1-a ( ) T 1,1 ( )
P
N = P
process/task then the serial component will not dominate
10
S N *P,P
S 1024 N,1024
a P
11
12
13
14
15
16
100 200 300 400 500 600 700 50 100 150 200 250 Time (seconds) Processes Large N Small N
17
1 10 100 1000 16 32 64 128 256 512 Time (seconds) Processes Large N Small N
18
1 2 3 4 5 6 50 100 150 200 250 Speedup Processes Large N Small N
19
0.2 0.4 0.6 0.8 1 1.2 50 100 150 200 250 Parallel Efficiency Processes Large N Small N
20
0.2 0.4 0.6 0.8 1 1.2 16 32 64 128 256 Parallel Efficiency Processes Large N Small N
scale
21
1 2 3 4 5 6 1 2 3 4 8 Speedup Nodes
performs and scales
22