Amdahls and Gustafson-Barsis laws revisited
The paper presents a simple derivation of the Gustafson-Barsis law from the Amdahl's law. In the computer literature these two laws describing the speedup limits of parallel applications are derived separately. It is shown, that treating the time of …
Authors: Andrzej Karbowski
Amdahl's and Gustafson-Barsis la ws revisited Andrzej Karb o wski Institute of Con trol and Computation Engineering, W arsa w Univ ersit y of T e hnology , ul. No w o wiejsk a 15/19, 00-665 W arsa w, P oland, NASK (Resear h and A ademi Computer Net w ork), ul. W¡ w ozo w a 18, 02-796 W arsa w, P oland E-mail: A.Karb o wskiia.p w.edu.pl Otob er 27, 2018 Abstrat The pap er presen ts a simple deriv ation of the Gustafson-Barsis la w from the Amdahl's la w. In the omputer literature these t w o la ws desribing the sp eedup limits of parallel appliations are deriv ed separately . It is sho wn, that treating the time of the exeution of the sequen tial part of the appliation as a onstan t, in few lines the Gustafson-Barsis la w an b e obtained from the Amdahl's la w and that the p opular laim, that Gustafson-Barsis la w o v erthro ws Amdahl's la w is a mistak e. Keyw ords: parallel omputing, distributed omputing, sp eedup 1 In tro dution The Amdahl's la w form ulated ab out four deades ago [ 1℄ is onsidered to b e one of the most inuen tial onepts in parallel and distributed pro essing [7℄. It desrib es the limits on the sp eedup obtained o wing to the exeution of the appliation on the parallel ma hine with relation to the single-pro essor, sequen tial ma hine. More preisely , Amdahl's la w sa ys, that the sp eedup of an appliation obtained o wing to the exeution on the parallel ma hine an- not b e greater that the reipro al of the sequen tial fration of the program. Sp eedup restritions resulting from Amdahl's la w prev en ted designers from exploiting parallelism for man y y ears, b eing a n uisane to v endors of parallel omputers [4℄. The resue ame from Sandia Labs. On the basis of some exp erimen ts, Gustafson [2 ℄ laimed that "the assumptions underlying Am- dahl's 1967 argumen t are inappropriate for the urren t approa h to massiv e ensem ble parallelism". F urthermore, Gustafson form ulated "an alternativ e to Amdahl's la w suggested b y E. Barsis at Sandia". The so-alled Gustafson- Barsis la w is said to vindiate the use of massiv ely parallel pro essing [5℄, [6 ℄. Ho w ev er, in the author's opinion, when w e analyze deep er b oth la ws, w e will see, that Gustafson's results do not refute the Amdahl's la w, and the Gustafson-Barsis la w an b e diretly deriv ed from the Amdahl's la w. 2 Amdahl's and Gustafson-Barsis la ws in the original form Although in the original Amdahl's pap er [1℄ there w ere no equations, basing on the v erbal desription one ma y presen t his onept formally . The w a y of our presen tation is similar to that of [3℄, [4℄, with only one dierene, whi h will b e explained later on. It is assumed in the mo del, that the program onsists of t w o parts: sequen tial and parallel. While the time of the exeu- tion of the sequen tial part for a giv en size n is the same on all ma hines, indep enden tly of the n um b er of pro essors p , the parallel part is p erfetly salable, that is, the time of its exeution on a ma hine with p pro essors is one p -th of the time of the exeution on the ma hine with one pro essor. Let us denote b y β ( n, p ) the sequen tial fration of the total real-time T ( n, p ) of the exeution of the program on a ma hine with p pro essors (the men- tioned dierene in tro dued here is treating b oth the fration β and time T as funtions of n and p ; it will pro v e to b e v ery useful afterw ards). With this notation w e ma y alulate the sequen tial part time T s for the giv en problem size n from the expression T s ( n ) = β ( n, 1) · T ( n, 1) (1) and the parallel part time T p , whi h is dep enden t on the problem size n and 2 the n um b er of pro essors p , from the expression T p ( n, p ) = (1 − β ( n, 1 )) · T ( n, 1) p (2) If w e ignore omm uniation osts and o v erhead osts asso iated with op er- ating system funtions, su h as pro ess reation, memory managemen t, et. [4℄, the total time T ( n, p ) will b e the sum of sequen tial and parallel part time, that is T ( n, p ) = T s ( n ) + T p ( n, p ) = β ( n, 1) · T ( n, 1) + (1 − β ( n, 1 )) · T ( n, 1) p = = β ( n, 1) + 1 − β ( n, 1 ) p · T ( n, 1) (3) F rom (3) w e get diretly the form ula for the sp eedup S ( n, p ) obtained due to the parallelization of the appliation: S ( n, p ) = T ( n, 1) T ( n, p ) = 1 β ( n, 1) + 1 − β ( n, 1) p (4) The form ula (4) is alled Amdahl's la w. It is seen, that in the limit S ( n, p ) → p → ∞ 1 β ( n, 1) (5) It means, that ev en when w e use innitely man y parallel pro essors, w e annot aelerate the alulations more than the reipro al of the sequen tial fration of the exeution time of the program on a sequen tial ma hine. That is, for example, when this fator equals 1 2 , the program an b e aelerated at most t wie, when 1 10 ten times! Sp eedup restritions resulting from Amdahl's la w prev en ted designers from exploiting parallelism for man y y ears, b eing a problem to v endors of parallel omputers [4℄. The help ame from Sandia Labs. In some exp erimen ts desrib ed b y Gustafson [2℄ it w as tak en, that the run time w as onstan t, while the problem size saled with the n um b er of pro essors. More preisely , the time of the sequen tial part w as indep enden t, while the w ork to b e done in parallel v aried linearly with the n um b er of pro essors. Sine the time of the exeution in Gustafson's pap er [2 ℄ w as normalized to 1, that is T s ( n ) + T p ( n, p ) = 1 (6) 3 w e had atually the equiv alene β ( n, p ) ≡ T s ( n ) (7) and T p ( n, p ) = 1 − β ( n, p ) (8) F ollo wing Gustafson, a serial pro essor w ould require time T s ( n ) + T p ( n, p ) · p to p erform the task, so the saled sp eedup on the parallel system w as equal: S ( n, p ) = T s ( n ) + T p ( n, p ) · p T s ( n ) + T p ( n, p ) = T s ( n ) + T p ( n, p ) · p = p + (1 − p ) · T s ( n ) (9) Using the equiv alene (7 ) w e ma y write (9) in the follo wing form: S ( n, p ) = p + (1 − p ) · T s ( n ) = p + (1 − p ) · β ( n, p ) = p − ( p − 1) · β ( n, p ) (10) The last equation is alled Gustafson-Barsis la w. 3 The main results In the Gustafson's pap er [2℄, three things raise some doubts: 1. Mixing the problem size and the n um b er of pro essors, treating b oth as tigh tly onneted ("the problem size sales with the n um b er of pro- essors") 2. Normalizing the time of alulations on the sequen tial ma hine to 1 (eq. (6)) for all problem sizes and n um b ers of pro essors 3. T reating assessmen t (10 ) as a b etter alternativ e to Amdahl's la w, de- riv ed indep enden tly , basing on dieren t assumptions The truth is, that Gustafson-Barsis la w is nothing but a dieren t form of Amdahl's la w, and that b etter v alues of the sp eedup in the Gustafson's ex- p erimen ts with the gro wing size of the problem ould b e obtained diretly from the Amdahl's la w. T o sho w this it is suien t to notie, that for a giv en problem size n there is a onstan t in all exeutions of the program, on ma hines with dieren t n um b er of pro essors. This onstan t is the time of the exeution of 4 the sequen tial part T s ( n ) for the giv en problem size n . It is indep enden t of the n um b er of pro essors p , that is: T s ( n ) = β ( n, p ) · T ( n, p ) = const., p = 1 , 2 , 3 , . . . (11) So, it will b e for an y p = 1 , 2 , 3 , . . . β ( n, 1) · T ( n, 1) = β ( n, p ) · T ( n, p ) (12) F rom the equation (12 ) w e get: β ( n, 1) = β ( n, p ) · T ( n, p ) T ( n, 1) (13) Replaing β ( n, 1) in equation (3 ) b y (13) w e will get: T ( n, p ) = β ( n, p ) · T ( n, p ) + T ( n, 1) p − β ( n, p ) · T ( n, p ) p (14) No w, m ultiplying b oth sides b y p and mo ving all omp onen ts with T ( n, p ) to the left hand side w e reeiv e: p · T ( n, p ) − p · β ( n, p ) · T ( n, p ) + β ( n, p ) · T ( n, p ) = T ( n, 1) (15) W e will get the v alue of sp eedup S ( n, p ) obtained o wing to the parallelization dividing b oth sides of the equation (15 ) b y T ( n, p ) . So, it will b e equal: S ( n, p ) = T ( n, 1) T ( n, p ) = p − ( p − 1) · β ( n, p ) (16) In this w a y w e reeiv ed nothing but Gustafson-Barsis la w ( 10). What onerns the b etter sp eedup in Gustafson's exp erimen ts with the gro wing size of the problem (and the n um b er of pro essors whi h w as link ed there) w e ma y explain it in the follo wing w a y . Gustafson assumed, that the time sp en t in the serial part ("for v etor startup, program loading, serial b ottlene ks, I/O op erations") do not dep end on the problem size, that is T s ( n ) = const. = T s = β ( n, 1) · T ( n, 1) = β s · T (1 , 1 ) , ∀ n (17) while the total time of the exeution of the parallel part on the sequan tial ma hine w as prop ortional to the problem size n . In this w a y the serial fator on the sequen tial ma hine β ( n, 1) w as equal β ( n, 1) = β s · T (1 , 1 ) β s · T (1 , 1 ) + n · (1 − β s ) · T (1 , 1) = β s β s + n · (1 − β s ) = 1 1 + n · ( 1 β s − 1) (18) 5 A similar situation w ould b e when the time T s ( n ) is prop ortional to the prob- lem size n (e.g. n · β s ), but the time sp en t in the parallel part is prop ortional to n 2 (e.g. n 2 · (1 − β s ) ). In su h ases β ( n, 1) → n → ∞ 0 (19) what means, taking in to aoun t (4), that S ( n, p ) → n → ∞ p (20) In other w ords, also from Amdahl's la w w e ma y onlude, that the bigger the size of the problem, the loser the sp eedup to the n um b er of pro essors. 4 Conlusions In the pap er it is sho wn, that the Gustafson-Barsis la w an b e diretly deriv ed from the Amdahl's la w, without strange assumptions as normalizng to one the time of exeution of the program on the sequen tial ma hine. Moreo v er, the sp eedups approa hing the n um b er of pro essors observ ed in the exp erimen ts desrib ed in the Gustafson's pap er an b e onluded from the Amdahl's la w, when w e tak e in to aoun t as the argumen ts of the serial fator the size of the problem and the n um b er of pro essors. A kno wledgmen ts This resear h w as supp orted b y the P olish Ministry of Siene and Higher Eduation under gran t N N514 416934 (y ears 2008-2010). Referenes [1℄ G. M. Amdahl, V alidit y of the Single-Pro essor Approa h to A hieving Large Sale Computing Capabilities, In AFIPS Conferene Pro eedings v ol. 30 (A tlan ti Cit y , N.J., Apr. 18-20), AFIPS Press, Reston, V a., pp. 483485, April 1967. [2℄ J. Gustafson, Reev aluating Amdahls La w, Comm uniations of the A CM 31(5), pp. 532533, 1988. 6 [3℄ T. Lewis, The next 10 , 000 2 y ears: P art I, IEEE Computer, 29(4), pp. 64 70, 1996. [4℄ T.G. Lewis, H. El-Rewini, In tro dution to P arallel Computing, Pren tie- Hall, Englew o o d Clis, N.J., 1992. [5℄ E.D. Reilly , Milestones in Computer Siene and Information T e hnol- ogy , Green w o o d Press, 2003. [6℄ A. Ralston, E.D. Reilly , D. Hemmendinger (eds.), Enylop edia of Com- puter Siene, F ourth Edition, Wiley , 2003. [7℄ M.D. Theys, S. Ali, H.J. Siegel, M. Chandy , K. Hw ang , K. Kennedy , L. Sha, K.G. Shin, M. Snir, L. Sn yder, T. Sterling, What are the top ten most inuen tial parallel and distributed pro essing onepts of the past millenium?, Journal of P arallel and Distributed Computing, 61 (12), pp. 1827-1841, 2001. 7
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment