HOME

TheInfoList



OR:

In
computer architecture In computer engineering, computer architecture is a description of the structure of a computer system made from component parts. It can sometimes be a high-level description that ignores details of the implementation. At a more detailed level, the ...
, Amdahl's law (or Amdahl's argument) is a formula which gives the theoretical speedup in latency of the execution of a task at fixed workload that can be expected of a system whose resources are improved. It states that "the overall performance improvement gained by optimizing a single part of a system is limited by the fraction of time that the improved part is actually used". It is named after
computer scientist A computer scientist is a person who is trained in the academic study of computer science. Computer scientists typically work on the theoretical side of computation, as opposed to the hardware side on which computer engineers mainly focus (a ...
Gene Amdahl Gene Myron Amdahl (November 16, 1922 – November 10, 2015) was an American computer architect and high-tech entrepreneur, chiefly known for his work on mainframe computers at IBM and later his own companies, especially Amdahl Corporation ...
, and was presented at the American Federation of Information Processing Societies (AFIPS) Spring Joint Computer Conference in 1967. Amdahl's law is often used in
parallel computing Parallel computing is a type of computation in which many calculations or processes are carried out simultaneously. Large problems can often be divided into smaller ones, which can then be solved at the same time. There are several different f ...
to predict the theoretical speedup when using multiple processors. For example, if a program needs 20 hours to complete using a single thread, but a one-hour portion of the program cannot be parallelized, therefore only the remaining 19 hours' () execution time can be parallelized, then regardless of how many threads are devoted to a parallelized execution of this program, the minimum execution time cannot be less than one hour. Hence, the theoretical speedup is limited to at most 20 times the single thread performance, \left(\dfrac = 20\right).


Definition

Amdahl's law can be formulated in the following way: : S_\text(s) = \frac 1 where * ''S''latency is the theoretical speedup of the execution of the whole task; * ''s'' is the speedup of the part of the task that benefits from improved system resources; * ''p'' is the proportion of execution time that the part benefiting from improved resources originally occupied. Furthermore, : \begin S_\text(s) \leq \dfrac 1 \\ pt\lim\limits_ S_\text(s) = \dfrac 1 . \end shows that the theoretical speedup of the execution of the whole task increases with the improvement of the resources of the system and that regardless of the magnitude of the improvement, the theoretical speedup is always limited by the part of the task that cannot benefit from the improvement. Amdahl's law applies only to the cases where the problem size is fixed. In practice, as more computing resources become available, they tend to get used on larger problems (larger datasets), and the time spent in the parallelizable part often grows much faster than the inherently serial work. In this case, Gustafson's law gives a less pessimistic and more realistic assessment of the parallel performance.


Derivation

A task executed by a system whose resources are improved compared to an initial similar system can be split up into two parts: * a part that does not benefit from the improvement of the resources of the system; * a part that benefits from the improvement of the resources of the system. An example is a computer program that processes files. A part of that program may scan the directory of the disk and create a list of files internally in memory. After that, another part of the program passes each file to a separate thread for processing. The part that scans the directory and creates the file list cannot be sped up on a parallel computer, but the part that processes the files can. The execution time of the whole task before the improvement of the resources of the system is denoted as T . It includes the execution time of the part that would not benefit from the improvement of the resources and the execution time of the one that would benefit from it. The fraction of the execution time of the task that would benefit from the improvement of the resources is denoted by p . The one concerning the part that would not benefit from it is therefore . Then: : T = (1 - p)T + pT. It is the execution of the part that benefits from the improvement of the resources that is accelerated by the factor s after the improvement of the resources. Consequently, the execution time of the part that does not benefit from it remains the same, while the part that benefits from it becomes: : \fracT. The theoretical execution time T (s) of the whole task after the improvement of the resources is then: : T(s) = (1 - p)T + \frac p s T. Amdahl's law gives the theoretical speedup in latency of the execution of the whole task ''at fixed workload W '', which yields : S_\text(s) = \frac = \frac = \frac 1 .


Parallel programs

If 30% of the execution time may be the subject of a speedup, ''p'' will be 0.3; if the improvement makes the affected part twice as fast, ''s'' will be 2. Amdahl's law states that the overall speedup of applying the improvement will be: : S_\text = \frac = \frac 1 = 1.18. For example, assume that we are given a serial task which is split into four consecutive parts, whose percentages of execution time are , , , and respectively. Then we are told that the 1st part is not sped up, so , while the 2nd part is sped up 5 times, so , the 3rd part is sped up 20 times, so , and the 4th part is sped up 1.6 times, so . By using Amdahl's law, the overall speedup is : S_\text = \frac = \frac = 2.19. Notice how the 5 times and 20 times speedup on the 2nd and 3rd parts respectively don't have much effect on the overall speedup when the 4th part (48% of the execution time) is accelerated by only 1.6 times.


Serial programs

For example, with a serial program in two parts ''A'' and ''B'' for which and , * if part ''B'' is made to run 5 times faster, that is and , then : S_\text = \frac 1 = 1.25; *if part ''A'' is made to run 2 times faster, that is and , then : S_\text = \frac 1 = 1.60. Therefore, making part ''A'' to run 2 times faster is better than making part ''B'' to run 5 times faster. The percentage improvement in speed can be calculated as : \text = 100 \left(1 - \frac 1 \right). * Improving part ''A'' by a factor of 2 will increase overall program speed by a factor of 1.60, which makes it 37.5% faster than the original computation. * However, improving part ''B'' by a factor of 5, which presumably requires more effort, will achieve an overall speedup factor of 1.25 only, which makes it 20% faster.


Optimizing the sequential part of parallel programs

If the non-parallelizable part is optimized by a factor of , then : T(O,s) = (1 - p)\frac + \frac T. It follows from Amdahl's law that the speedup due to parallelism is given by : S_\text(O,s) = \frac = \frac . When s=1, we have S_\text(O,s)=1, meaning that the speedup is measured with respect to the execution time after the non-parallelizable part is optimized. When s=\infty, : S_\text(O,\infty) = \frac = \frac = 1 + \fracO. If 1-p=0.4, O=2 and s=5, then: : S_\text(O,s) = \frac = \frac = 2.5.


Transforming sequential parts of parallel programs into parallelizable

Next, we consider the case wherein the non-parallelizable part is reduced by a factor of , and the parallelizable part is correspondingly increased. Then : T'(O',s) = \frac T + \left(1-\frac\right) \frac. It follows from Amdahl's law that the speedup due to parallelism is given by : S'_\text(O',s) = \frac = \frac . The derivation above is in agreement with Jakob Jenkov's analysis of the execution time vs. speedup tradeoff.


Relation to the law of diminishing returns

Amdahl's law is often conflated with the law of diminishing returns, whereas only a special case of applying Amdahl's law demonstrates law of diminishing returns. If one picks optimally (in terms of the achieved speedup) what is to be improved, then one will see monotonically decreasing improvements as one improves. If, however, one picks non-optimally, after improving a sub-optimal component and moving on to improve a more optimal component, one can see an increase in the return. Note that it is often rational to improve a system in an order that is "non-optimal" in this sense, given that some improvements are more difficult or require larger development time than others. Amdahl's law does represent the law of diminishing returns if one is considering what sort of return one gets by adding more processors to a machine, if one is running a fixed-size computation that will use all available processors to their capacity. Each new processor added to the system will add less usable power than the previous one. Each time one doubles the number of processors the speedup ratio will diminish, as the total throughput heads toward the limit of 1/(1 − ''p''). This analysis neglects other potential bottlenecks such as memory bandwidth and I/O bandwidth. If these resources do not scale with the number of processors, then merely adding processors provides even lower returns. An implication of Amdahl's law is that to speed up real applications which have both serial and parallel portions,
heterogeneous computing Heterogeneous computing refers to systems that use more than one kind of processor or cores. These systems gain performance or energy efficiency not just by adding the same type of processors, but by adding dissimilar coprocessors, usually incor ...
techniques are required. There are novel speedup and energy consumption models based on a more general representation of heterogeneity, referred to as the normal form heterogeneity, that support a wide range of heterogeneous many-core architectures. These modelling methods aim to predict system power efficiency and performance ranges, and facilitates research and development at the hardware and system software levels.


See also

* Gustafson's law *
Analysis of parallel algorithms In computer science, the analysis of parallel algorithms is the process of finding the computational complexity of algorithms executed in parallel – the amount of time, storage, or other resources needed to execute them. In many respects, analysi ...
* Critical path method *
Moore's law Moore's law is the observation that the number of transistors in a dense integrated circuit (IC) doubles about every two years. Moore's law is an observation and projection of a historical trend. Rather than a law of physics, it is an empi ...


References


Further reading

*


External links

* * . Amdahl discusses his graduate work at the University of Wisconsin and his design of WISC. Discusses his role in the design of several computers for IBM including the STRETCH,
IBM 701 The IBM 701 Electronic Data Processing Machine, known as the Defense Calculator while in development, was IBM’s first commercial scientific computer and its first series production mainframe computer, which was announced to the public on May ...
, and
IBM 704 The IBM 704 is a large digital mainframe computer introduced by IBM in 1954. It was the first mass-produced computer with hardware for floating-point arithmetic. The IBM 704 ''Manual of operation'' states: The type 704 Electronic Data-Proce ...
. He discusses his work with Nathaniel Rochester and IBM's management of the design process. Mentions work with Ramo-Wooldridge,
Aeronutronic Aeronutronic was a defense related division of Ford Aerospace, owned by Ford Motor Company, and based in Newport Beach, Orange County, California. The Engineering and Research Center campus was located on Jamboree Road at Ford Road, overlooking ...
, and
Computer Sciences Corporation Computer Sciences Corporation (CSC) was an American multinational corporation that provided information technology (IT) services and professional services. On April 3, 2017, it merged with the Enterprise Services line of business of HP Ente ...

Amdahl's Law: Not all performance improvements are created equal
(2007)
"Amdahl's Law"
by Joel F. Klein,
Wolfram Demonstrations Project The Wolfram Demonstrations Project is an organized, open-source collection of small (or medium-size) interactive programs called Demonstrations, which are meant to visually and interactively represent ideas from a range of fields. It is hos ...
(2007)
Amdahl's Law in the Multicore Era
(July 2008)

(Charles Leiserson, May 2008)
Evaluation of the Intel Core i7 Turbo Boost feature
by James Charles, Preet Jassi, Ananth Narayan S, Abbas Sadat and Alexandra Fedorova (2009)
Calculation of the acceleration of parallel programs as a function of the number of threads
by George Popov, Valeri Mladenov and Nikos Mastorakis (January 2010)
Danny Hillis - Proving Amdahl's Law wrong, video recorded October 2016
{{Parallel Computing Analysis of parallel algorithms Computer architecture statements