SYSTEM Cited by 1 source
vmstat¶
What it is¶
vmstat — "virtual memory statistics" — is a command-line tool
that prints a single-line summary of system-wide run-queue, memory,
swap, I/O, system, and CPU-time counters per sampling interval. It's
one of the oldest Unix performance utilities, originally written for
BSD in the 1980s; Linux's port reads the same counters from
/proc/stat / /proc/meminfo / /proc/diskstats.
Why it matters on the wiki¶
vmstat 1 is command #3 in Netflix's
[[patterns/sixty-second-performance-checklist|60-second performance
checklist]] and supplies the two most load-bearing signals of the
whole sequence on one line:
rcolumn — number of tasks running on CPU + waiting for a turn. The canonical wiki primitive for CPU saturation. Rule:r > CPU count= saturation. Cleaner than load average because it excludes I/O- blocked tasks.- CPU time breakdown (
us / sy / id / wa / st) — see concepts/cpu-time-breakdown. On one line: application work vs kernel work vs idle vs disk-wait vs hypervisor-stolen.
Output columns¶
procs -----memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
r— tasks running or runnable (CPU saturation).b— tasks in uninterruptible sleep (usually disk I/O).swpd— swap used (KB).free— idle memory (KB). Don't over-interpret; usefree -mfor the load-bearing accounting.si/so— swap-in / swap-out (KB/s). Non-zero on either → you're paging; host is out of memory.bi/bo— block in / out (blocks/s from/to block devices).in/cs— interrupts and context-switches per second.us / sy / id / wa / st— CPU time breakdown.
Operational conventions¶
- First line is since-boot. It reports averages since boot, not the previous second. Skip it.
- Argument is interval in seconds.
vmstat 1= 1-second samples until Ctrl-C. Very cheap — all counters are/procreads. - Pair with
mpstat -P ALL 1to see per-CPU distribution —vmstatshows system-wide averages that hide single-hot-CPU patterns.
Interpretation rules from the Netflix checklist¶
r > CPU count= CPU saturation.si + so > 0= swapping; host is out of memory, triage memory before anything else.us + sy > 90= CPU utilisation near ceiling; checkrfor saturation.wa > 0sustained = disk bottleneck; pivot toiostat -xz 1.st > 0= hypervisor-stolen cycles (co-tenancy signature).
Seen in¶
- sources/2025-07-29-netflix-linux-performance-analysis-in-60-seconds
— canonical wiki reference. Netflix's 60-second checklist uses
vmstat 1as the third command and the single most information-dense output in the sequence.
Related¶
- concepts/cpu-utilization-vs-saturation · concepts/cpu-time-breakdown · concepts/load-average
- systems/mpstat — per-CPU counterpart.
- systems/sysstat-package — the umbrella package that ships related tools.
- patterns/sixty-second-performance-checklist