Contents
- Three numbers are not three percent of the CPU
- Read the order as a time trend
- CPU count gives a benchmark, but not yet a diagnosis
- High load with low CPU often needs a wait view
- High CPU with reasonable load can be normal work
- Resource pressure and responses are added to the load itself
- Connect a regular peak with a specific activity
- How to set a meaningful alarm and what to write in the end
- Frequently asked questions
Three numbers are not three percent of the CPU
Uptime or top output usually contains the triple load average. On Linux, this is the smoothed number of tasks that are executable, i.e. running or waiting for the processor, and tasks in some uninterruptible wait. The number is therefore not a percentage of processor utilization and cannot be mechanically confused with the CPU value in the monitoring panel.
uptime
cat /proc/loadavg
nprocThe first value approximates the short-term state in one minute, the second the longer state in five, and the third in fifteen minutes. More precisely, these are exponentially smoothed values, not a simple arithmetic sum of the last samples divided by a fixed window length. Therefore, the reaction to the change takes some time to catch up, and the numbers may not immediately follow the currently displayed CPU percentage.
A task in this context may not be the same as a single application line in a regular process list. Threads can form multiple scheduled tasks. A single database process with many worker threads may affect load differently than a single-threaded script. The number of programs running without knowing their state alone does not explain the resulting value.
Read the order as a time trend
The illustrative output of 8.00, 3.00, 1.50 indicates that the short-term load is significantly higher than the longer-term average. This may not be a fault: a scheduled backup or calculation may have just started. The opposite sequence of 0.50, 3.00, 8.00 may indicate that the system is already off load. In both cases, you need more samples and operational knowledge.
This is not an exact record of the moment the task started. A short spike may only be partially reflected in the one-minute smoothing, and the fifteen-minute number may remain high after the problem is resolved. If everything is responding quickly now, it is not possible to prove a persistent outage from the longer-term load alone. Similarly, a new fault may be initially masked by a longer average.
- The one-minute load is growing and the response is deteriorating: look for the queue that just formed and its cause.
- High all three values: the problem or batch load lasts for a longer period of time.
- Short load has dropped and long load remains high: monitor the recovery and verify that the queues have indeed emptied.
When comparing multiple graphs, verify their time range and aggregation. Two curves may appear shifted simply because one records the end of a minute interval and the other records the instantaneous value. Record the specific time and output if you want to associate a spike with a timer, incoming requests, or incident.
CPU count gives a benchmark, but not yet a diagnosis
For a purely CPU load, it helps to compare the load with the available number of logical CPUs. If four CPUs have four continuously running compute tasks, they can be approximately fully employed without a large additional queue. If eight of them are competing for the CPU, some may be waiting. This model is useful, but only under the assumptions stated.
So a load value of 4 does not mean a universally good or bad state. On one CPU with a compute queue, it is something different than on sixteen CPUs. However, the presence of tasks waiting continuously can distort this ratio. Four tasks waiting for storage does not indicate that four cores are fully utilized.
lscpu
top
# Pokud je dostupný sysstat, pohled na jednotlivé CPU:
mpstat -P ALL 1 5Also consider quotas and allocated capacity. A container may see a wider machine but have a CPU limit of one processor. Additionally, the load seen in the container may reflect the wider system depending on the environment used. In that case, use the appropriate cgroup metrics and limits. Nproc is a useful metric, not a universal indicator of available performance budget.
High load with low CPU often needs a wait view
Linux also includes non-interruptible wait jobs in the load, which often show up as a D state. They might be waiting for I/O, for example. If many of these jobs are running at a high load and the CPU is mostly idle, adding cores may not have an effect. First, identify the specific wait location and the affected storage or other resource.
ps -eo state,pid,ppid,comm,wchan:32 | awk 'NR==1 || $1 ~ /^D/'
vmstat 1 10
# Pokud je dostupný sysstat:
iostat -xz 1 10Wchan can help give a rough indication of the kernel wait, but it depends on system permissions and configuration. It is not automatically the exact cause of the error. Vmstat and iostat add additional views that need to be read based on their units and number of devices. For network storage or virtual disks, it is not enough to assume that the local device is the only critical link.
A D status is not automatically evidence of a physical disk failure, and a high wa is not a complete list of pending applications. Check for related kernel events, remote file system availability, and current service activity. Distinguish measured behavior from an explanation that you are still investigating.
High CPU with reasonable load can be normal work
If you are fully utilizing several cores with a long computation, there may not be a large queue of other tasks. The CPU may be high and the load may be approximately equal to the number of active compute threads. This in itself is not an error. What matters is whether interactive requests have the necessary response and whether the system meets operational goals.
Conversely, one important serial task may be consuming a single core, leaving the rest of the processors free. The overall load will not be dramatic, but the specific request will be slow. First, look at the actual application and its critical path. The green overall average does not rule out a single-threaded bottleneck, a database lock, or waiting for a remote API.
Switching the nice or relative weight can change who gets the CPU in a contention. It will not guarantee that an expensive calculation will be completed in less time, nor will it eliminate unnecessary work. Consider priority changes in conjunction with task completion times and service responsiveness. Success is not just a less noticeable number on the dashboard.
Resource pressure and responses are added to the load itself
Pressure Stall Information metrics may be available on supported Linux systems. They describe the amount of time that tasks are held up by a lack of specific resources. This supplements the general load with a view of CPU, memory, and I/O. Availability and scope are governed by kernel configuration and environment; a missing file does not mean zero pressure.
cat /proc/pressure/cpu
cat /proc/pressure/memory
cat /proc/pressure/ioPSI values have their own definitions and time windows, so don't add them up or pass them off as the same metric as load average. Track concurrency with measurable application responsiveness, queues, and errors. If memory pressure and heavy swapping are the problem, the solution isn't to mechanically increase CPU quota.
For a web service, also compare request latency and error rate. The average response can hide the slow portion of requests, so monitor percentiles and queue waits based on availability. This application data is not replaced by a single operational number, even though its graph would look neat.
Connect a regular peak with a specific activity
If the load increases at the same time, compare systemd, cron, backup, sync, and cache refresh timers. Capture several process CPU and I/O intervals. After a short task completes, the load may remain elevated, so look for the event even a moment before looking at the dashboard. Timing matches are a guide, not a substitute for proving that a specific process is working.
systemctl list-timers --all --no-pager
top -b -d 1 -n 10 -o %CPU
sudo journalctl -u NAZEV.service --since "-30 min" --no-pagerDon't turn off a regular integrity check or backup just because it creates a visible peak. Consider the purpose, cost, and ability to break up the concurrency or eliminate unnecessary repetitive work. If the job completes correctly, responses remain on target, and the system has headroom, a brief peak may be an expected part of the operation.
How to set a meaningful alarm and what to write in the end
A generic "load greater than 1" alarm is difficult to apply across machines. Consider available capacity, normal operation, duration, and service impact. The alarm can be a combination of sustained growth, resource pressure, and response goal violation. The threshold is intended to alert you to a condition that requires intervention, not to every successful batch job.
- It is clear which machine or cgroup the value describes.
- You know the available CPUs and any higher-level limitations.
- CPU, waits, and application responses explain the observed trend.
- When an intervention is made, a specific service is specified, not just a general high number.
- Measurement after the change uses the same definitions, intervals, and approximately comparable traffic.
In CH-J Tools, you can monitor load and utilization along with other system data. However, always name them separately when evaluating. The wording “load average 6 with two vCPUs, D-heavy workloads, and slow I/O” says much more than “CPU is 600 percent.” A precise description will help you choose a fix that matches the real cause.
Frequently asked questions
Is the load average a percentage?
No. On Linux, it is a smoothed number of executable tasks and tasks in certain non-interruptible waits.
Is load 4 on four CPUs always OK?
No. It depends on the type of jobs, queues, quotas, and application responsiveness. The ratio alone is not a complete diagnosis.
Why doesn't the load drop immediately after the task ends?
Values are time-smoothed and longer averages are gradually caught up. Also follow current processes and new samples.
Will more cores help under high load?
Only if the cause is usable processor capacity. An uninterrupted wait for I/O or another resource requires a different solution.
Detailed documentation
Linux: meaning of /proc/loadavg →
procps-ng: uptime and load average →
Linux kernel: Pressure Stall Information →