ITNuvoAkademiya
Academy homePackagesPlaylistsToolsSubnet calculatorSearchGlossary
CiscoCCNA · CCNA: networking fundamentals1. Introduction2. Network Fundamentals3. Network Access4. IP Connectivity5. IP Services6. IPv67. Security Fundamentals8. AutomationCCNP: Enterprise networks · coming soon
LinuxLinux: system administrator üçün · Linux for system administrators1. Getting to know Linux2. Working with text3. Users and permissions4. Processes and packages5. Inside the system6. Monitoring and logs7. NetworkingRed Hat Enterprise Linux · Red Hat Enterprise Linux: from beginner to advanced1. Getting started2. Packages3. Users and permissions4. SELinux5. Services6. Storage7. Networking8. Building services9. Boot and recovery10. DevOps11. Security and monitoring
FortinetFortiGate Administrator · FortiGate Administrator: from first login to ZTNA1. Getting to know FortiGate2. Routing, policy and NAT3. Security profiles4. Users and logs5. Resilience, SD-WAN and automation6. VDOM7. VPN and ZTNA8. Proxy9. DMZ
MonitoringZabbix · Zabbix: from installation to alerts1. Introduction2. Installation and the database3. Basics: groups, templates, users4. Connecting devices5. Alerts, Grafana and the API
VirtualizationProxmox VE · coming soonVMware ESXi · coming soon
My account / Sign in
AZENRU
← itnuvo.com

Resources: load average, free, vmstat, iostat

Lesson 6.18 minIntermediateDecember 1, 2026
Open

This lesson is open to everyone. The other lessons open with a package: sign in or sign up, then choose a package.

Key points

  • load average is the average number of running and waiting processes over the last 1, 5 and 15 minutes; compare it with the core count (nproc).
  • In free -h look at the available column: even if free is small, Linux uses spare memory for cache.
  • vmstat 1: r (CPU queue), si/so (swap) and wa (disk wait) reveal the bottleneck.
  • iostat -xz 1: %util and await show disk load (package sysstat).
  • The one-minute check: uptime → free -h → vmstat 1 5 → iostat -xz 1 3 → df -h → top.

Four resources

Every performance problem runs into one of four resources. Each has its question:

ResourceQuestionMain tool
CPUIs the processor at 100%, or is there a queue?uptime, top, vmstat
MemoryHas RAM run out, is swap in use?free, vmstat
DiskIs the disk slow to respond?iostat, vmstat wa
NetworkIs bandwidth full, are there too many connections?ss, ip -s link (unit 7)

load average

srv-web01
ali@srv-web01:~$ uptime
 11:24:05 up  2:29,  1 user,  load average: 0.42, 0.35, 0.30
ali@srv-web01:~$ nproc
2

The three numbers are averages over the last 1, 5 and 15 minutes. Load is the number of processes running on the CPU and waiting for it (on Linux, processes waiting for disk in state D are included too).

Compare the number with the core count:

Load on a 2-core serverMeaning
0.4Relaxed, most of the CPU is idle
2.0Fully loaded, no queue
6.03 jobs per core — processes are waiting

The direction of the three numbers also tells you something: 5.1, 2.0, 0.8 — load is rising now; 0.8, 2.0, 5.1 — it is falling, the problem has passed.

free: memory

srv-web01
ali@srv-web01:~$ free -h
               total        used        free      shared  buff/cache   available
Mem:           1.9Gi       842Mi       312Mi        12Mi       812Mi       956Mi
Swap:          2.0Gi          0B       2.0Gi

The most common beginner mistake: free is 312 MB, "memory is running out!" In fact Linux uses spare RAM as disk cache (buff/cache) and gives it back immediately when a program needs it. The real indicator is the available column — 956 MB.

You should worry if:

  • available is below 10% of total memory;
  • Swap used keeps growing;
  • the log shows Out of memory: Killed process — the kernel killed a process to free memory (the OOM killer):
srv-web01
ali@srv-web01:~$ sudo journalctl -k | grep -i "out of memory"
Nov 28 03:12:40 srv-web01 kernel: Out of memory: Killed process 1340 (mysqld) total-vm:1789420kB, anon-rss:1203112kB

vmstat: everything on one line

srv-web01
ali@srv-web01:~$ vmstat 1 5
procs -----------memory---------- ---swap-- -----io---- -system-- -------cpu-------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st gu
 1  0      0 319812  61204 770388    0    0    12    40  210  380  3  1 96  0  0  0
 0  0      0 319780  61204 770392    0    0     0    16  188  341  2  1 97  0  0  0
 4  2      0 318944  61212 770410    0    0  9820  4210  902 1544 21  9 41 29  0  0
 5  3      0 318120  61212 770455    0    0 11240  5016  988 1690 24 10 33 33  0  0
 1  0      0 319410  61220 770460    0    0    40    52  230  402  4  1 95  0  0  0

1 — every second, 5 — five times. The first line is the average since boot, the rest are live.

ColumnMeaningWhen it is bad
rWaiting in the CPU queueConsistently above the core count
bProcesses blocked waiting for diskConsistently above 0
si, soReading from / writing to swapNot 0 — RAM is short
bi, boBlocks read from / written to diskDepends on context
us, syUser and kernel CPU timeTogether close to 90%
waWaiting for diskAbove 20% — the disk is the bottleneck

In this example, in seconds 3 and 4, wa is 29–33% and b is 2–3: something is writing heavily to disk (for example a backup). Next step — which disk?

iostat: disk

iostat is in the sysstat package (sudo apt install sysstat):

srv-web01
ali@srv-web01:~$ iostat -xz 1 2 | tail -n 4
Device            r/s     w/s     rkB/s     wkB/s  r_await  w_await  aqu-sz  %util
sda              2.00    8.00     32.00    160.00     0.50     1.10    0.01   1.20
sdb            310.00   45.00  11240.00   1820.00     4.80     6.20    1.71  92.40
sdc              0.00  120.00      0.00   5016.00     0.00     2.30    0.28  18.00
ColumnMeaning
r/s, w/sRead/write operations per second (IOPS)
rkB/s, wkB/sVolume transferred per second
r_await, w_awaitAverage wait per operation (ms) — a few ms is normal for SSD
%utilHow busy the disk is

Conclusion: sdb (the site disk) is 92% busy, 11 MB/s are read from it — the site directory is being archived to /backup. The fix: move the backup to night hours and lower its priority with nice/ionice (ionice -c3 tar ...).

The one-minute check

When you log in to a server with a "it is slow" complaint, this sequence usually shows where the problem is within a minute:

StepCommandWhat you look at
1uptimeIs load above the core count? Rising or falling?
2free -hIs available low? Is swap in use?
3vmstat 1 5r, wa, si/so
4iostat -xz 1 3Which disk has %util near 100%?
5df -hIs a disk full? (a full disk stops many services)
6top (P, M)Which process is the culprit?
7journalctl -p err -S -1hErrors in the last hour

This does not show everything, but it narrows the search to one of the four resources.

History: sar

Once installed, sysstat collects statistics every 10 minutes. In the morning you can see what happened at 3 a.m.:

srv-web01
ali@srv-web01:~$ sar -u -s 02:50:00 -e 03:20:00
02:50:01 AM     CPU     %user     %nice   %system   %iowait    %steal     %idle
03:00:01 AM     all     61.20      0.00      8.41     22.13      0.00      8.26
03:10:01 AM     all     58.77      0.00      7.90     25.02      0.00      8.31

sar -r gives memory history, sar -d disk, sar -n DEV network. For permanent monitoring (graphs, alerts), systems such as Zabbix or Prometheus + Grafana are used — we cover them in a separate course.

Look at the server's state with uptime, free -h and df -h in the Linux simulator.

Check yourself

5 questions · answers are shown instantly · 3 correct answers complete the lesson

1What does a load average of 8.0 mean on a 4-core server?

Always compare load with the core count.

2Which column in free -h shows the memory that can really be used?

Linux uses spare RAM for cache; available takes that into account.

3If wa in vmstat is 35%, where is the bottleneck?

wa is the time the CPU spends waiting for the disk.

4What is happening if si and so in vmstat are consistently above 0?

Constant swap activity slows a server down badly.

5How do you look in the morning at CPU load that happened during the night?

sysstat keeps the history and sar shows it.
Was this lesson useful?

Comments

Sign in to comment.