Download presentation
1
Amdahl's Law
2
𝑆𝑝𝑒𝑒𝑑𝑢𝑝= 𝑂𝑙𝑑 𝑇𝑖𝑚𝑒 𝑁𝑒𝑤 𝑇𝑖𝑚𝑒
Speed up 𝑆𝑝𝑒𝑒𝑑𝑢𝑝= 𝑂𝑙𝑑 𝑇𝑖𝑚𝑒 𝑁𝑒𝑤 𝑇𝑖𝑚𝑒 A program used to take 20 minutes to run. Now it takes 15. What is the speedup? 1.33 times or 33% 𝑆𝑝𝑒𝑒𝑑𝑢𝑝= =1.33
3
Gene Amdahl
4
Amdahl's Law Describes overall speedup of a system when we speed up one part of a system 𝑆= 1 1−𝑓 + 𝑓 𝑘
5
Amdahl's Law Describes overall speedup of a system when we speed up one part of a system f : fraction of time part is limiting factor 𝑆= 1 1−𝑓 + 𝑓 𝑘
6
Amdahl's Law Describes overall speedup of a system when we speed up one part of a system f : fraction of time part is limiting factor k : speedup of that part 𝑆= 1 1−𝑓 + 𝑓 𝑘
7
Amdahl's Law Describes overall speedup of a system when we speed up one part of a system f : fraction of time part is limiting factor k : speedup of that part 1 – f : fraction of time doing other stuff 𝑆= 1 1−𝑓 + 𝑓 𝑘
8
Amdahl's Law Describes overall speedup of a system when we speed up one part of a system f : fraction of time part is limiting factor k : speedup of that part 1 – f : fraction of time doing other stuff S : speed up 𝑆= 1 1−𝑓 + 𝑓 𝑘
9
Example On a large system, suppose we can upgrade its disk drives for $7,000 to make them 150% faster. Processes spend 70% of their time running in the CPU and 30% of their time waiting for disk service. What would the expected speedup be?
10
Example 𝑆= 1 1−𝑓 + 𝑓 𝑘 f : fraction of time part is limiting factor
…upgrade its disk drives for $7,000 to make them 150% faster. Processes spend 70% of their time running in the CPU and 30% of their time waiting for disk service f : fraction of time part is limiting factor k : speedup of that part 1 – f : fraction of time doing other stuff S : speed up 𝑆= 1 1−𝑓 + 𝑓 𝑘
11
Example 𝑆= 1 1−.30 + .30 2.50 150% increase on 100% = 250%
…upgrade its disk drives for $7,000 to make them 150% faster. Processes spend 70% of their time running in the CPU and 30% of their time waiting for disk service f : fraction of time part is limiting factor k : speedup of that part 1 – f : fraction of time doing other stuff S : speed up 𝑆= 1 1− 150% increase on 100% = 250%
12
Example 𝑆= 1 .70+.12 𝑆= 1 .82 𝑆=1. 21951 Speed up is ~ 22%
…upgrade its disk drives for $7,000 to make them 150% faster. Processes spend 70% of their time running in the CPU and 30% of their time waiting for disk service Speed up is ~ 22% 𝑆= 𝑆= 1 .82 𝑆=
13
Example On a large system, suppose we can upgrade its disk drives for $7,000 to make them 150% faster. Processes spend 70% of their time running in the CPU and 30% of their time waiting for disk service. Or we could spend $10,000 to upgrade the CPU to be 50% faster…
14
Example …upgrade its cpu to run 50% faster. Processes spend 70% of their time running in the CPU and 30% of their time waiting for disk service f : fraction of time part is limiting factor k : speedup of that part 1 – f : fraction of time doing other stuff S : speed up 𝑆= 1 1−
15
Example 𝑆= 1 .30+.46 6 𝑆= 1 .76 6 𝑆=1.304 Speed up is ~ 30%
…upgrade its cpu to run 50% faster. Processes spend 70% of their time running in the CPU and 30% of their time waiting for disk service Speed up is ~ 30% 𝑆= 𝑆= 𝑆=1.304
16
Choices Disks : 22% speedup for $7,000 ~ $318 per %
CPU : 30% speedup for $10,000 ~ $333 per %
17
Non IO Protein String Matching Code Which is the better tradeoff?
4 days execution time on current machine 20% of time doing integer instructions 35% percent of time doing I/O Which is the better tradeoff? Compiler optimization that reduces number of integer instructions by 25% Hardware optimization that reduces the latency of each IO operations from 6us to 5us.
18
Non IO Reduce instructions by 25% = 33% speedup (1/.75)
Reduce IO from 6us to 5us = 20% speedup (6/5) 𝑆= 1 1− 𝑆= 1 1− 𝑆= 𝑆=
19
Limitations of Amdahl's Law
Amdahl's Law doesn't take into account interactions Speeding up one part of process may change the % of time it is limiting factor
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.