Performance Analysis

Performance counters show a program's IPC is very low at 0.3, with many last-level cache misses. Which pairs the likely situation with a remedy?

  1. AThe CPU spends much time stalled on memory; change data layout or apply blocking to use caches effectively
  2. BComputation is too fast; raise the frequency
  3. CThere are too few branches; add more
Show answer and explanation

Answer: A. The CPU spends much time stalled on memory; change data layout or apply blocking to use caches effectively

Modern CPUs can execute several instructions per cycle, so an IPC of 0.3 means they are waiting most of the time. Many last-level cache misses suggest long waits for data from main memory. Effective remedies reduce cache misses: laying data out at consecutive addresses, reordering loops, or blocking so data is reused many times.

  • A. Correct. These are classic memory-bound symptoms.
  • B. Raising frequency does not shorten memory waits.
  • C. Adding branches does not help.
Practice this topic Back to topic

More Performance Analysis questions

  1. Performance counters reveal very frequent branch mispredictions. Which is a suitable remedy?
  2. In top-down microarchitecture analysis using performance counters, which are the major categories into which CPU issue slots are divided?
  3. A program is slow, yet CPU utilization is only about 20%. What is the most likely cause?
  4. To check whether a program is compute-bound or memory-bound, its run time is measured at different CPU frequencies. What is the typical result if it is memory-bound?
  5. When the Roofline model shows a workload in the memory-bandwidth-limited region, which direction improves performance?