Performance Analysis
A program is slow, yet CPU utilization is only about 20%. What is the most likely cause?
- AThe CPU computes too fast
- BThe program has too few instructions
- CMuch time is spent waiting without using the CPU, for example on disk or network I/O or on locks
Show answer and explanation
Answer: C. Much time is spent waiting without using the CPU, for example on disk or network I/O or on locks
If a program is slow while CPU utilization is low, most of its time is likely spent waiting on something outside the CPU: disk reads and writes, network responses, or locks held by other threads. A faster CPU or optimized computation code would barely help. Effective measures include batching I/O, making it asynchronous so other work proceeds during waits, and shrinking lock scopes.
- A. Being too fast cannot cause slowness.
- B. Few instructions do not cause slowness.
- C. Correct. A faster CPU would not solve it.