You are on page 1of 25

Amdahl’s Law

(Speedup Performance)

By-
Shailendra Kumar Singh

By: Shailendra Kumar Singh, CSE


1
Department, MNNIT Allahabad
Amdahl’s Law
• Amdahl’s Law is a law governing the speedup of
performance using parallel processors on a problem,
versus using only one serial processor, under the
assumption that the problem size remains the same
when parallelized
• Speedup is the ratio of the time it takes to execute a
program in serial (with one processor) to the time it
takes to execute in parallel ( with many processors).

By: Shailendra Kumar Singh, CSE


2
Department, MNNIT Allahabad
Amdahl’s Law
• S(n)=T(1)/T(n)
= Time taken to execute the program using single processor/
Time taken to execute the program using n number of processors

Example:
T(1)=1 sec, if n=2 processors then T(2)= 1/2 = 0.5 sec
S(n)=T(1)/T(n) = 1/0.5 = 2
means speedup increase by 2 times

By: Shailendra Kumar Singh, CSE


3
Department, MNNIT Allahabad
Amdahl’s Law
• The potential speedup of an algorithm on parallel
computing platform is given by Amdahl’s law.
• It is one of the speedup performance law.
• It is based on a fixed problem size ( fixed work load)
• The speedup doesn’t increase linearly as the number
of processor increases. In fact, speed-up tends to
become saturated.

By: Shailendra Kumar Singh, CSE


4
Department, MNNIT Allahabad
Amdahl’s Law
• Amdahl’s law states that a small portion of the
program which cannot be parallelized (serial part),
will limit the overall speedup, available from
parallelization.
• Any large engineering problem consists of several
parallelizable part & several serial (non-
parallelizable) parts.

• Computation Problem= Serial part + Parallel part

By: Shailendra Kumar Singh, CSE


5
Department, MNNIT Allahabad
Amdahl’s Law
• The speedup of a program using multiple processors
in parallel computing is limited by the time needed
for the sequential fraction ( non-parallelizable part)
of the program.

By: Shailendra Kumar Singh, CSE


6
Department, MNNIT Allahabad
Amdahl’s Law
• Let ‘f’ be the fraction of operations in a computation
that must be performed sequentially, where 0≤ f ≤ 1.
The maximum speedup achievable by a parallel
computer with n processors is
1
• Maximum Speedup 𝑆(𝑛) =
1−𝑓
𝑓+
𝑛

By: Shailendra Kumar Singh, CSE


7
Department, MNNIT Allahabad
Example 1
• 70% of a program can be executed in parallel
and rest 30% in serial. S(n)? n=8

By: Shailendra Kumar Singh, CSE


8
Department, MNNIT Allahabad
Example 1
• 70% of a program can be executed in parallel
and rest 30% in serial. S(n)? n=8

• S(n)=1/(.3+(1-.3)/8)=1/0.3875=2.6

By: Shailendra Kumar Singh, CSE


9
Department, MNNIT Allahabad
Example 2
• 80% of a program can be executed in parallel
and rest 20% in serial. S(n)? n=8

By: Shailendra Kumar Singh, CSE


10
Department, MNNIT Allahabad
Example 2
• 80% of a program can be executed in parallel
and rest 20% in serial. S(n)? n=8

• S(n)=1/(.2+(1-.2)/8)=1/0.3=3.33

By: Shailendra Kumar Singh, CSE


11
Department, MNNIT Allahabad
Example 3
• 95% of a program can be executed in parallel
and rest 5% in serial. S(n)? n=8

By: Shailendra Kumar Singh, CSE


12
Department, MNNIT Allahabad
Example 3
• 95% of a program can be executed in parallel
and rest 5% in serial. S(n)? n=8

• S(n)=1/(.05+(1-.05)/8)=5.9

By: Shailendra Kumar Singh, CSE


13
Department, MNNIT Allahabad
By: Shailendra Kumar Singh, CSE
14
Department, MNNIT Allahabad
By: Shailendra Kumar Singh, CSE
15
Department, MNNIT Allahabad
Topologies
• Bus
• Ring
• Tree
• Mesh
• Hybrid
• Hypercube
• Butterfly

By: Shailendra Kumar Singh, CSE


16
Department, MNNIT Allahabad
Hypercube Networks
• Cube-connected or binary n-cube network
• Network consisting of 2^k nodes (Processors)
forming a k-dimensional hypercube.
• Nodes value are labelled as 0,1,2,………..2^(k-1)
• Physical link of one node with other nodes = K
• Eg. K=0, Nodes=1; K=1, Nodes=2

.0 0 . .1
By: Shailendra Kumar Singh, CSE
17
Department, MNNIT Allahabad
Cont….

By: Shailendra Kumar Singh, CSE


18
Department, MNNIT Allahabad
Cont….

By: Shailendra Kumar Singh, CSE


19
Department, MNNIT Allahabad
Butterfly Network
• Consists nodes = (k+1)2 ^k
• Number of Rows= K+1
• No. of elements in each row= 2^k

By: Shailendra Kumar Singh, CSE


20
Department, MNNIT Allahabad
By: Shailendra Kumar Singh, CSE
21
Department, MNNIT Allahabad
By: Shailendra Kumar Singh, CSE
22
Department, MNNIT Allahabad
By: Shailendra Kumar Singh, CSE
23
Department, MNNIT Allahabad
By: Shailendra Kumar Singh, CSE
24
Department, MNNIT Allahabad
By: Shailendra Kumar Singh, CSE
25
Department, MNNIT Allahabad

You might also like