Amdahl's law

The theoretical speedup of the latency (via a reduction of latency, ie: latency as a metric is elapsed time between an input and output in a system) of the execution of a program as a function of the number of processors executing it, according to Amdahl's law. The speedup is limited by the serial part of the program. For example, if 95% of the program can be parallelized, the theoretical maximum speedup using parallel computing would be 20 times.

In computer architecture, Amdahl's law (or Amdahl's argument[1]) 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.

The law can be stated as:

"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".[2]

It is named after computer scientist Gene Amdahl, 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 to predict the theoretical speedup when using multiple processors. For example, if a program needs 20 hours to complete using a single thread, and a one-hour portion of the program cannot be parallelized, then only the remaining 19 hours' (p = 0.95) execution time can be parallelized. Therefore, regardless of how many threads are devoted to a parallelized execution of this program, the minimum execution time is always more than 1 hour. Hence, the theoretical speedup is, at most, 20 times the single thread performance, .


Universal Scalability Law (USL), developed by Neil J. Gunther, extends the Amdahl's law and accounts for the additional overhead due to interprocess communication. USL quantifies scalability based on parameters such as contention and coherency. [3]

Definition

Amdahl's law can be formulated in the following way:[4]

where

  • Slatency 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,

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.[5]

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 . 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 . The one concerning the part that would not benefit from it is therefore . Then:

It is the execution of the part that benefits from the improvement of the resources that is accelerated by the factor 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:

The theoretical execution time of the whole task after the improvement of the resources is then:

Amdahl's law gives the theoretical speedup in latency of the execution of the whole task at fixed workload , which yields

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:

For example, assume that we are given a serial task which is split into four consecutive parts, whose percentages of execution time are p1 = 0.11, p2 = 0.18, p3 = 0.23, and p4 = 0.48 respectively. Then we are told that the 1st part is not sped up, so s1 = 1, while the 2nd part is sped up 5 times, so s2 = 5, the 3rd part is sped up 20 times, so s3 = 20, and the 4th part is sped up 1.6 times, so s4 = 1.6. By using Amdahl's law, the overall speedup is

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

Assume that a task has two independent parts, A and B. Part B takes roughly 25% of the time of the whole computation. By working very hard, one may be able to make this part 5 times faster, but this reduces the time of the whole computation only slightly. In contrast, one may need to perform less work to make part A perform twice as fast. This will make the computation much faster than by optimizing part B, even though part B's speedup is greater in terms of the ratio, (5 times versus 2 times).

For example, with a serial program in two parts A and B for which TA = 3 s and TB = 1 s,

  • if part B is made to run 5 times faster, that is s = 5 and p = TB/(TA + TB) = 0.25, then
  • if part A is made to run 2 times faster, that is s = 2 and p = TA/(TA + TB) = 0.75, then

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

  • 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

It follows from Amdahl's law that the speedup due to parallelism is given by

When , we have , meaning that the speedup is measured with respect to the execution time after the non-parallelizable part is optimized.

When ,

If , and , then:

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

It follows from Amdahl's law that the speedup due to parallelism is given by

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 techniques are required.[6] 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.[7][8]

See also

References

  1. ^ Rodgers, David P. (June 1985). "Improvements in multiprocessor system design". ACM SIGARCH Computer Architecture News. 13 (3). New York, NY, USA: ACM: 225–231 [p. 226]. doi:10.1145/327070.327215. ISBN 0-8186-0634-7. ISSN 0163-5964. S2CID 7083878.
  2. ^ Reddy, Martin (2011). API Design for C++. Burlington, Massachusetts: Morgan Kaufmann Publishers. p. 210. doi:10.1016/C2010-0-65832-9. ISBN 978-0-12-385003-4. LCCN 2010039601. OCLC 666246330.
  3. ^ Gunther, Neil (2007). Guerrilla Capacity Planning: A Tactical Approach to Planning for Highly Scalable Applications and Services. ISBN 978-3540261384.
  4. ^ Bryant, Randal E.; David, O'Hallaron (2016), Computer Systems: A Programmer's Perspective (3 ed.), Pearson Education, p. 58, ISBN 978-1-488-67207-1
  5. ^ McCool, Michael; Reinders, James; Robison, Arch (2013). Structured Parallel Programming: Patterns for Efficient Computation. Elsevier. p. 61. ISBN 978-0-12-415993-8.
  6. ^ Hill, Mark D.; Marty, Michael R. (2008). "Amdahl's Law in the Multicore Era". Computer. 41 (7): 33–38. CiteSeerX 10.1.1.221.8635. doi:10.1109/MC.2008.209.
  7. ^ Rafiev, Ashur; Al-Hayanni, Mohammed A. N.; Xia, Fei; Shafik, Rishad; Romanovsky, Alexander; Yakovlev, Alex (2018-07-01). "Speedup and Power Scaling Models for Heterogeneous Many-Core Systems". IEEE Transactions on Multi-Scale Computing Systems. 4 (3): 436–449. doi:10.1109/TMSCS.2018.2791531. ISSN 2332-7766. S2CID 52287374.
  8. ^ Al-hayanni, Mohammed A. Noaman; Xia, Fei; Rafiev, Ashur; Romanovsky, Alexander; Shafik, Rishad; Yakovlev, Alex (July 2020). "Amdahl's law in the context of heterogeneous many-core systems – a survey". IET Computers & Digital Techniques. 14 (4): 133–148. doi:10.1049/iet-cdt.2018.5220. ISSN 1751-8601. S2CID 214415079.

Further reading

Read other articles:

Children's book by Laura Numeroff and Felicia Bond This article is about the picture book. For the television adaptation, see If You Give a Mouse a Cookie (TV series). If You Give a Mouse a Cookie AuthorLaura NumeroffIllustratorFelicia BondCountryUnited StatesLanguageEnglishSeriesIf You Give...GenreChildren's literatureMedia typeHardback If You Give a Mouse a Cookie is an American children's picture book written by Laura Numeroff and illustrated by Felicia Bond, first published in 1985 b...

Cet article est une ébauche concernant une chronologie ou une date et le Maroc. Vous pouvez partager vos connaissances en l’améliorant (comment ?) selon les recommandations des projets correspondants. Chronologies Chronologie du Maroc à la Préhistoire Maroc protohistorique : Haut Moyen Âge, Moyen Âge : Chronologie du Haut Moyen Âge Chronologie du Maroc au Moyen Âge Maroc contemporain du XIXe siècle: Maroc contemporain du XXe siècle: La période du Protectorat franç...

Eleições presidenciais portuguesas de 2016 Distritos: Aveiro | Beja | Braga | Bragança | Castelo Branco | Coimbra | Évora | Faro | Guarda | Leiria | Lisboa | Portalegre | Porto | Santarém | Setúbal | Viana do Castelo | Vila Real | Viseu | Açores | Madeira | Estrangeiro ← 2011 •  • 2021 → Eleições presidenciais portuguesas de 2016 nos Açores 24 de janeiro de 2016 Demografia eleitoral Hab. inscritos:  228 087 Votantes : 7...

Місто|зображення_підпис= |категорія в Commons= КиселякKiseljak Панорама Киселяка Герб Координати 43°56′35″ пн. ш. 18°04′38″ сх. д.H G O Країна  Боснія і Герцеговина Боснія і ГерцеговинаСуб'єкт конфедерації Федерація Боснія і ГерцеговинаКантон СередньобоснійськийМуні�...

Michael Bentt Nombre Michael BenttNacimiento Londres, Inglaterra4 de septiembre de 1964 (59 años)Alma máter Aviation High School, Northampton Community CollegeEstilo OrtodoxoPeso Peso pesadoNacionalidad  Estados UnidosEstadísticasTotal 13Victorias 11 • Por nocaut 6Derrotas 2[editar datos en Wikidata] Michael Bentt (Londres, 4 de septiembre de 1964) es un ex boxeador estadounidense. Fue campeón de los pesos pesados de la Organización Mundial de Boxeo entre ...

Het drieluik De Verzoeking van de heilige Antonius is een klein drieluik dat omstreeks 1525 geschilderd is door Jan Wellens de Cock en dat zich bevindt in het Flipje & Streekmuseum in de Nederlandse stad Tiel. Geschiedenis De herkomst van het schilderij is niet bekend. In 1810 kwam het in het bezit van de Sint-Antoniusbroederschap te Tiel. Deze Broederschap bestond al sinds de Middeleeuwen. Op 13 februari van dat jaar werd namelijk: een treffelijk schilderij van de duivelse tentatie van d...

Raedu BashaLahir(1988-06-03)3 Juni 1988Sumenep, IndonesiaKebangsaanIndonesiaNama lainLora Badrus ShalehAlmamaterUniversitas Gadjah MadaPekerjaanSastrawanPenulisAntropologTahun aktif2000 - sekarangSuami/istriIffah HannahAnakElnaz Raedu Basha (lahir 3 Juni 1988) adalah seniman, sastrawan, dan antropolog[1] berkebangsaan Indonesia. Namanya dikenal melalui sejumlah karyanya berupa cerita pendek, puisi, esai sastra dan etnografi yang dipublikasikan media massa, dia juga sering ka...

John LandLand announcing his 2013 campaign for mayorMayor of Apopka, FloridaIn officeJanuary 1, 1971 – April 22, 2014Preceded byLeonard HurstSucceeded byJoe KilsheimerIn officeJanuary 1, 1950 – January 1, 1968Preceded byDr. C. H. DamselSucceeded byLeonard Hurst Personal detailsBorn(1920-11-05)November 5, 1920Plant City, Florida, U.S.DiedNovember 22, 2014(2014-11-22) (aged 94)Orlando, Florida, U.S.Political partyRepublicanSpouseBetty Hall LandProfessionpolitician Joh...

Gayal Status konservasi Domestikasi Klasifikasi ilmiah Kerajaan: Animalia Filum: Chordata Kelas: Mamalia Ordo: Artiodactyla Famili: Bovidae Subfamili: Bovinae Genus: Bos Spesies: B. frontalis Nama binomial Bos frontalisLambert, 1804 Gayal (Bos frontalis) atau Mithun adalah sejenis sapi asli timur laut Asia Selatan yang tersebar di Timur laut India, Bangladesh, utara Myanmar, hingga Tiongkok. lbsKeluarga Bovidae yang masih hidupBerikut ini adalah subfamili, genus, dan spesies dalam keluar...

Urraca of Portugal أوراكا البرتغالية (بالبرتغالية: Urraca de Portugal)‏  ملكة ليون القرينة فترة الحكم1165–1175 مرافق yes معلومات شخصية الميلاد 1148قلمرية الوفاة حوالي 1211وامبا، بلد الوليد مكان الدفن دير سانتا ماريا دي وامبا مواطنة مملكة البرتغال  الديانة الكاثوليكية الزوج فرناندو الثاني م�...

Karte der Kfz-Kennzeichen in Deutschland (wiedereingeführte Kennzeichen in Blau, nicht wiedereingeführte in Rot) Dies ist eine Liste der deutschen Landkreise und Städte mit ihren Kfz-Kennzeichen. In ihr werden die Verwaltungsbezirke in Deutschland aufgeführt und die dazugehörenden gültigen, aber auch die aufgehobenen Unterscheidungszeichen aufgelistet. Unterscheidungszeichen und Erkennungsnummer Deutsches Kfz-Kennzeichenschild in der gegenwärtigen Form (hinten) Die ein bis drei Buchsta...

Japanese manga series by Masatoshi Kawahara Shura no MonCover of the first tankōbon cover, featuring Mutsu Tsukumo (right)修羅の門(Shura no Mon)GenreMartial arts MangaWritten byMasatoshi KawaharaPublished byKodanshaMagazineMonthly Shōnen MagazineDemographicShōnenOriginal runApril 1987 – November 1996Volumes31 MangaMutsu Enmei-ryū Gaiden: Shura no TokiWritten byMasatoshi KawaharaPublished byKodanshaMagazineMonthly Shōnen MagazineDemographicShōnenOriginal runJuly...

American television series RavenswoodGenre Teen drama Mystery Thriller Supernatural drama Magic realism Horror Created by Joseph Dougherty Oliver Goldstick I. Marlene King Starring Nicole Gale Anderson Tyler Blackburn Steven Cabral Brett Dier Britne Oldford Luke Benward Merritt Patterson Composers Michael Suby Joel J. Richard Country of originUnited StatesOriginal languageEnglishNo. of seasons1No. of episodes10ProductionExecutive producers Leslie Morgenstein I. Marlene King Oliver Goldstick J...

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Kalyug Aur Ramayan – news · newspapers · books · scholar · JSTOR (August 2022) (Learn how and when to remove this template message) 1987 Indian filmKalyug Aur RamayanUltra CD CoverDirected byBabubhai MistriStory byManoj Kumar(written by)Dawood Kashmiri (dialogu...

هوغو وولف (بالألمانية: Hugo Wolf)‏  معلومات شخصية اسم الولادة (بالإنجليزية: Hugo Philipp Jacob Wolf)‏  الميلاد 13 مارس 1860(1860-03-13)سلوفينج غرادتس الوفاة 22 فبراير 1903 (42 سنة)فيينا سبب الوفاة احتشاء الدماغ  مكان الدفن مقبرة فيينا المركزية  مواطنة الإمبراطورية النمساوية المجرية الإمبر�...

Indian caste found predominantly in Maharashtra For Marathi people or Maharashtrians, see Marathi people. MarathaReligionsHinduismLanguagesMarathiKonkaniCountryIndiaPopulated statesMajority:MaharashtraMinority:Goa,Karnataka,Telangana,Madhya PradeshGujaratRegionWestern IndiaCentral India The Maratha caste[note 1] is composed of 96 clans, originally formed in the earlier centuries from the amalgamation of families from the peasant (Kunbi), shepherd (Dhangar), blacksmith (Lohar), carpent...

Palomar knotCategoryHitchReleasingNon-jammingTypical useFishing The Palomar knot (/ˈpæləmɑːr/ PAL-ə-mar) is a knot that is used for securing a fishing line to a fishing lure, snap or swivel. Steps in tying a Palomar knot (free end is colored red). 1. Tie the loose overhand knot. 2. Pass the object through the remaining loop. 3. Start snug. 4. Finish snug (pull evenly on standing ends). 5. View of obverse side. To tie the knot first double 8–12 inches of line into a loop and pass it th...

Outdated grouping of human beings For other uses, see Mongoloid (disambiguation). Mongoloid (/ˈmɒŋ.ɡə.lɔɪd/[1]) is an obsolete racial grouping of various peoples indigenous to large parts of Asia, the Americas, and some regions in Europe and Oceania. The term is derived from a now-disproven theory of biological race.[2] In the past, other terms such as Mongolian race, yellow, Asiatic and Oriental have been used as synonyms. The concept of dividing humankind into the Mon...

Artikel ini bukan mengenai Hari Perdamaian Sedunia. Hari Perdamaian InternasionalBendera Perserikatan Bangsa-BangsaDirayakan olehsemua negara anggota PBBJenisDeklarasi Internasional PBBPerayaanMultiple world wide eventsTanggal21 SeptemberFrekuensitahunanTerkait denganPeace Movement Hari Perdamaian Internasional (bahasa Inggris: International Day of Peace), terkadang secara tidak resmi ada yang menyebutnya Hari Perdamaian Dunia (World Peace Day), diperingati setiap tahun pada tanggal 21 Se...

Amphibians that produce poisonPoison dart frogs are well known for their brightly colored skin. The bright colors warn potential predators of their toxicity. Poisonous amphibians are amphibians that produce toxins to defend themselves from predators. Amphibians Most toxic amphibians are poisonous to touch or eat. These amphibians usually sequester toxins from animals and plants on which they feed, commonly from poisonous insects or poisonous plants. Except certain salamandrid salamanders that...