Processor Performance

Attributes

  • Execution/Response Time
    • The time between the start and completion of a task
    • Improving response time improves throughput
  • Throughput
    • Total amount of work done in a given time

Comparing Performance

  • (P: performance, E: execution time)
  • “X is n times as fast as Y”

Measuring Performance

  • Elapsed time
    • Total time to complete a task
    • Includes disk accesses, memory accesses, I/O, OS overhead, etc.
  • CPU (Execution) Time
    • The time the CPU spends computing the task
    • Does not include time spent waiting for I/O or running other programs
  • User CPU Time
    • CPU time spent within the program itself
  • System CPU Time
    • CPU time spent by the OS performing tasks on behalf of the program
    • Lines of this is pretty blurry

Amdahl’s Law

  • When you’re given the time something is taken as a part of a whole and then how much that part is sped up by
  • Ex: 60 seconds of 100 seconds is improved by 3x

Application: If you’re going to improve something, improve the thing that you use the most

Can deal with multiple performance changes by adding more of nested fractions (the 1 - fraction will be 1 - the sum of all the affected fractions)

Impacts

Clock

  • Clocks synchronize the hardware
  • Clock Cycle
    • Time intervals in which the CPU can do an action
    • Synchronizes all the hardware
  • Clock Rate
    • Clock cycles per second
    • Measured in (giga)hertz
    • Inverse of clock cycle time
    • This is one way that faster hardware can make a program run faster
  • Increasing clock rate
    • Can improve performance in exchange for using more Power
    • Can only go so fast because eventually you will hit the limits of the hardware (adders can only add so fast)

Instruction Performance

  • Different instructions take different a different number of cycles
  • Different factors can impact Instruction Count (IC)
  • Clock Cycles per Instruction (CPI) = Average number of clock cycles an instruction takes to execute for a program of program fragment

Factors

  • Algorithm: IC, possibly CPI
  • Programming language: IC, CPI
  • Compiler: IC, CPI
  • Instruction set architecture: IC, CPI
  • Chip implementation: CPI

Reporting Performance

  • There are chip independent test suites
  • Take the weighted arithmetic mean of the execution times
    • weighted by the ratio of how frequently the tasks occur relative to each other
  • You can use the geometric mean to compare performance to a reference machine

Millions of Instructions Per Second (MIPS)

  • Really bad at comparing processors
  • Doesn’t account for
    • Difference in Instruction Set Architecture between computers
    • Differences in complexity between instruction
    • Differences in CPI between programs