Performance Analysis

Benchmarks on a laptop vary widely between runs of the same program. Which pairs a CPU-side cause with a countermeasure correctly?

  1. AThe CPU instruction set changes each run; fix the instruction set
  2. BThe number of CPU cores changes each run; add cores
  3. CFrequency changes from turbo operation and temperature; fix the frequency or measure under thermally settled conditions
Show answer and explanation

Answer: C. Frequency changes from turbo operation and temperature; fix the frequency or measure under thermally settled conditions

Modern CPUs automatically raise and lower frequency according to thermal and power headroom. Starting cool, turbo makes runs fast; as the chip heats up during repeated runs, frequency drops, so the same program yields different results each time. To see the effect of a change correctly, fix the frequency, match power settings, wait for temperatures to settle and take many measurements for statistics.

  • A. The instruction set does not change between runs.
  • B. The core count does not change.
  • C. Correct. Power settings also affect results.
Practice this topic Back to topic

More Performance Analysis questions

  1. When measuring performance on multicore or NUMA systems, why are threads sometimes pinned to specific cores (setting affinity)?
  2. When analyzing the performance of a GPU program, what is the most appropriate thing to check first?
  3. When choosing servers for a data center, which is NOT a consideration beyond peak performance?
  4. When evaluating a claim that "the new method is 100× faster," what is most important to check?
  5. Why is SSD performance often stated not only as sequential read bandwidth (MB/s) but also as 4 KB random-read IOPS (I/O operations per second)?