Lec 2
Lec 2
Performance Issues
+
Designing for Performance
The cost of computer systems continues to drop dramatically, while the performance
and capacity of those systems continue to rise equally dramatically
Today’s laptops have the computing power of an IBM mainframe from 10 or 15 years
ago
Processors are so inexpensive that we now have microprocessors we throw away
Desktop applications that require the great power of today’s microprocessor-based
systems include:
Image processing
Three-dimensional rendering
Speech recognition
Videoconferencing
Multimedia authoring
Voice and video annotation of files
Simulation modeling
06/08/2025
+
Relative Performance
+
Measuring Execution Time
+
Execution Time and CPU Clocking
+
CPU Time
+
EXAMPLE
Our favorite program runs in 10 seconds on computer A,
which has a 2 GHz clock. We are trying to help a
computer designer build a computer, B, which will run
this program in 6 seconds. The designer has determined
that a substantial increase in the clock rate is possible,
but this increase will affect the rest of the CPU design,
causing computer B to require 1.2 times as many clock
cycles as computer A for this program. What clock rate
should we tell the designer to target?
+
Answer
To run the program in 6 seconds, B must have twice the clock rate of A.
+
Instruction Count and CPI
Clock Cycles per Instruction (CPI)
• Instructions take different number of cycles to execute
– Multiplication takes more time than addition
– Floating point operations take longer than integer ones
– Accessing memory takes more time than accessing registers
• CPI is an average number of clock cycles per instruction
I1 I2 I3 I4 I5 I6 I7
CPI 14/7 =
= 2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 cycles
• Important point
Changing the cycle time often changes the number of cycles required
for various instructions (more later)
13
+
CPI Example
+
CPI in More Detail
Performance Equation
• To execute, a given program will require …
– Some number of machine instructions
– Some number of clock cycles
– Some number of seconds
• We can relate CPU clock cycles to instruction count
CPU cycles = Instruction Count × CPI
Hard to do
Programming for performance
Load balancing
Optimizing communication and synchronization
+
Amdahl's Law
In computer architecture, Amdahl's
law (or Amdahl's argument) is a formula that
shows how much faster a task can be completed
when you add more resources to the system.
06/08/2025
+
Benchmark Principles
Desirable
characteristics of a
benchmark program:
SPEC
An industry consortium
Defines and maintains the best known collection of
benchmark suites aimed at evaluating computer systems
Performance measurements are widely used for comparison
and research purposes
+ Best known SPEC benchmark suite