1 / 8

Recap

Recap. Amdahl’s Law. Performance impact of optimizing part of a program: Let an optimization speedup f fraction of time by a factor of s : New Time = OldTime x [(1-f) x 1 + f x (1/s)] Speedup = s > 1.0 for speedup, f <= 1.0 as it is a fraction. Amdahl’s Law. New Time. Old Time. = s.

shiloh
Download Presentation

Recap

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Recap

  2. Amdahl’s Law • Performance impact of optimizing part of a program: • Let an optimization speedup f fraction of time by a factor of s: • New Time = OldTime x [(1-f) x 1 + f x (1/s)] • Speedup = • s > 1.0 for speedup, f <= 1.0 as it is a fraction

  3. Amdahl’s Law New Time Old Time = s

  4. Example 1 Which change is more effective on a certain Processor: speeding up 10-fold the floating point square root operation only, which takes up 20% of execution time, or speeding up 2-fold all floating point operations, which take up 50% of total execution time? (Assume that the cost of accomplishing either change is the same, and the two changes are mutually exclusive.) • SPEEDUPSQ = 1/((1-0.2) + (0.2/10)) = 1.22, or 22% • SPEEDUPFP = 1/((1-0.5) + (0.5/2)) = 1.33, or 33% Improving all FP operations is more effective

  5. Example • SPEEDUPSQ = 1/((1-0.2) + (0.2/10)) = 1.22, or 22% • SPEEDUPFP = 1/((1-0.5) + (0.5/2)) = 1.33, or 33% Improving all FP operations is more effective

  6. Amdahl’s Law Law of Diminishing Returns:The Performance Enhancement Possible Is Limited By the Amount That the Improved Feature Is Used.

  7. Example • A server spends 50% of CPU time on I/O and 50% on computation. What is the speedup if we replace the CPU with one that is 8 times faster?

  8. Multi-Core (parallelism) and Amdah’s law • Suppose a program takes 1 unit of time to execute serially • A fraction of the program, s, is inherently serial (unparallelizable) • For example, consider a program that, when executing on one core processor, spends 20% of its time in a non-parallelizable region. How much faster will this program run on a 4-processor system? • What is the maximum speedup from parallelization? 5 Speedup =1T/0.4T = 2.5

More Related