The Central Processing Unit (CPU) is the brain of a computer, and for IT professionals, assessing CPU stress is foundational knowledge. However, this task may not be as simple as you think. This is a 4-part article series aim to guide you in evaluating CPU stress.
Part 1: Single-Core CPU Utilization: Demystifies why processes have to wait even when CPU utilization appears low.
Part 2: Multi-Core CPU Utilization: Explores how multiple cores within a CPU complicate the assessment of CPU utilization.
Part 3: CPU Run Queue Size: A more accurate metric for evaluating CPU stress
Part 4: CPU Load: A numerical measure of CPU stress, it differs slightly between Linux and Unix.
CPU Run Queue Size
Compare to CPU utilization, the time processes spend in CPU run queue provides a more accurate measure of CPU stress. On Linux, several tools enable you to monitor this metric:
- The number of processes in the CPU run queue is shown in the
runq-szfield of thesar -qcommand output. - Per-thread run queue latency can be found in
/proc/PID/schedstats. - CPUs run queue latency id recorded in
/proc/schedstat. - Additional tools: Utilities like
perf schedcan also provide detailed insights of run queue.
Below is an example output from the sar -q command:
oracle@Yuan ~$ sar -q 1 3
Linux 4.14.35-2047.505.4.3.el7uek.x86_64 (dell.scutech) 04/08/2025 _x86_64_ (80 CPU)
06:55:03 PM runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15 blocked
06:55:04 PM 9 2521 6.04 1.91 0.73 0
06:55:05 PM 12 2521 6.04 1.91 0.73 0
06:55:06 PM 9 2521 6.04 1.91 0.73 0
Average: 10 2521 6.04 1.91 0.73 0
In this output:
- runq-sz values (9, 12, 9) indicate that 9 to 12 tasks were either waiting in the run queue or actively running during each one-second interval.
- ldavg-1, ldavg-5, ldavg-15: These represent the system load averages over the past 1, 5, and 15 minutes, respectively. I’ll elaborate on this metric in the subsequent section.
To accurately assess CPU stress, it’s essential to evaluate CPU usage alongside the run queue size. While CPU utilization shows how busy the processor is, the run queue size reveals how many tasks are contending for CPU time, offering a fuller picture of system performance under load.





Leave a reply to How to Assess CPU Stress (Part 1/4): Single-Core CPU Utilization – Yuan Yao, An Oracle ACE's Blog Cancel reply