Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCI206 - Computer Organization & Programming

Similar presentations


Presentation on theme: "CSCI206 - Computer Organization & Programming"— Presentation transcript:

1 CSCI206 - Computer Organization & Programming
Performance zyBook: [1.8], 4.1, 4.2, 4.3, 4.5

2 Chip Manufacturing

3 From sand to silicon

4 At the end of the day, what matters is PERFORMANCE.

5 At the end of the day, what matters is PERFORMANCE.
(and cost, too, obviously!)

6 At the end of the day, what matters is PERFORMANCE.
(and cost, too, obviously!) (and power consumption!)

7 Defining performance A) B) C) D)
socrative.com student login: MENG7820 Defining performance Which airplane has the best performance? A) B) $300M, low operating costs, 375 pass, 610 mph. $350M, med operating costs, 470 pass, 610 mph. C) D) $34M, high operating costs, 146 pass, 544 mph. $??M, very high operating costs, 132 pass, 1,350 mph.

8 Measuring computing performance
the common computing metric used to measure performance is throughput how much work can be completed in a certain amount of time (e.g., one second) e.g.: Bytes/sec, FLOPS, FPS

9 Performance Defined 1 / time is the throughput of the system
if the execution time is 0.5 seconds the throughput is 2 executions per second

10 Comparing performance
X is n times faster than Y if X is faster than Y, n > 1

11 X is n times faster than Y
If X is in fact faster than Y, n > 1 If n < 1, X is slower than Y The faster machine is n times faster than the slower machine For n > 1, the execution time on the TOP has to be the larger number. This is the SLOWER computer (y)

12 Practice A task on blue takes 5 seconds.
socrative.com student login: MENG7820 Practice A task on blue takes 5 seconds. The same task on red takes 7.5 seconds. How much faster is blue than red? A. 5 / 7.5 B / 5 C. 5 / 2.5 D / 5

13 Refining CPU performance
Execution time is a good measure. It is broadly affected by the CPU architecture (ISA), operating system/ABI, and clock rate. How do we measure the performance of an ISA?

14 Clock Cycle The system clock synchronizes when the logic circuits change state within the CPU

15 Clock Cycle

16 Cycles Per Instruction (CPI)
Metric to quantify performance of an ISA implementation CPI The average number of clock cycles per instruction for a program or program fragment. A certain CPU takes 2,000 clock cycles to execute 1,000 machine language instructions,the CPI is 2.0.

17 CPI in more detail Early processors had CPI = 1 for all instructions.
However, some operations are inherently more difficult (e.g., integer add vs. floating point divide). In modern processors the CPI will depend on the operation being performed.

18 Iron Law of CPU Performance
decompose performance into 3 key parts: program (workload) specific ISA implementation performance chip physical performance

19 Iron Law of CPU Performance
aka

20 Performance question What is the execution time for a program with 5 B instructions and a clock rate of 2.5 GHz?

21 Performance question What is the execution time for a program with 5 B instructions and a clock rate of 2.5 GHz and CPI = 1?

22 Performance question What is the execution time for a program with 5 B instructions and a clock rate of 2.5 GHz and CPI = 2?

23 Average CPI On a given program the CPI will vary for different classes of instruction, we can compute the average CPI from the specific instruction mix.

24 Example A CPU has 3 instruction classes (A, B, C) the compiler chooses which instructions to use in a program. With the default compiler program P1 is generated using 5 instructions. An optimizing compiler is used and it avoids instructions with high CPI to improve performance but needs 6 instructions. What is the CPI in each case?

25 Evaluating performance
Instruction mix has a big impact on performance To compare various CPUs (fairly!) we use a variety of programs that consists of different instruction mixes (that represent different real workloads) These programs are called benchmarks

26 SPEC 2006 INT benchmark core i7 920

27 Pitfall “Expecting the improvement of one aspect of a computer to increase overall performance by an amount proportional to the size of the improvement.”

28 Example A cyclist improves their aerodynamic performance by a factor of 3. This yields a performance improvement that is about (not 3!) Why? Aerodynamics contribute only a small part to the overall performance (speed). Traditional setup 3 x more aerodynamic

29 Computing Example Prof. Xavier got a new quad-core, 2.6GHz computer to replace his 5 year-old single core, 2.4GHz computer. When he runs applications on the new computer (such as word processor, photo browser, media player, etc.), he notes almost no improvement but he expected a 4x speedup.

30 Amdahl’s Law Example: a certain application takes 10 s to load, of this 10% can be executed in parallel. The new execution time on a quad core computer is 9.25 s.

31 Pitfall In modern CPUs CPI varies widely
Using instructions per second or clock rate as a measure of performance. In modern CPUs CPI varies widely Instruction mix and CPI must be taken into account!

32 From sand to chip


Download ppt "CSCI206 - Computer Organization & Programming"

Similar presentations


Ads by Google