Performance Analysis

What is the difference between wall-clock time and CPU time?

  1. AWall-clock time is the actual elapsed time from start to finish, including I/O waits; CPU time counts only time the CPU spent executing the program
  2. BWall-clock time and CPU time are always equal
  3. CCPU time is time measured on a wall clock
Show answer and explanation

Answer: A. Wall-clock time is the actual elapsed time from start to finish, including I/O waits; CPU time counts only time the CPU spent executing the program

Wall-clock time is what the user actually waits, including time spent waiting for disk or network and time yielded to other programs. CPU time is the total time the CPU spent executing the program's instructions. If wall-clock time is much longer than CPU time, a lot of time is spent waiting. Conversely, with multiple threads running in parallel, total CPU time can exceed wall-clock time.

  • A. Correct. Their difference reveals waiting time.
  • B. They differ when there is waiting or parallel execution.
  • C. A wall clock measures wall-clock time.
Practice this topic Back to topic

More Performance Analysis questions

  1. Which correctly describes throughput and latency as server performance measures?
  2. When evaluating web service response times, why is the 99th percentile (the boundary of the slowest 1%) often examined in addition to the mean?
  3. A server receives 100 requests per second, each taking 0.2 seconds on average (steady state). How many requests are in progress at once on average (Little's law)?
  4. What happens to request waiting time as server utilization (fraction of busy time) approaches 100%?
  5. What is the purpose of using a profiler when improving program performance?