Use it when processes are killed, the system swaps heavily, or memory keeps growing.
High Memory Usage
High memory usage means available memory is low, the system swaps, or the OOM killer stops processes.
1. free -h — available low?
2. ps aux --sort=-rss | head — biggest processes.
3. OOM: journalctl -k | grep -i oom.
4. Growing over time → leak; restart as a workaround, report/fix.
5. Limit or add memory.
processes allocate → available memory falls → swap → OOM kill
For Linux Troubleshooting → High Memory Usage, continue with the first unproven Topic check: Capture MemAvailable, swap, pressure/reclaim and top process/cgroup consumers over the incident window. If that boundary is healthy, advance to the adjacent check: Distinguish anonymous RSS, mapped/file cache, slab and shared memory before attributing growth. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
journalctl -k | grep -i 'out of memory'Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
Healthy evidence: memory accounting identifies the responsible consumer or limit, pressure/OOM evidence clears after a targeted change and representative workload remains stable over a meaningful interval.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Capture MemAvailable, swap, pressure/reclaim and top process/cgroup consumers over the incident window.
- Distinguish anonymous RSS, mapped/file cache, slab and shared memory before attributing growth.
- Check cgroup limits, oom-kill evidence, allocation failures and workload concurrency.
- Remediate the confirmed consumer/limit, replay representative load and verify memory pressure plus workload latency/error rate.
Step 3 Commands Verify boundary
free -h
ps -eo pid,rss,cmd --sort=-rss | head
journalctl -k | grep -i 'out of memory'
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: free memory alone is used as evidence, VIRT is treated as RSS, caches are dropped as a default fix, or an OOM victim is blamed without tracing the memory-driving workload.
Step 5 Common mistakes Narrow the fault
- Counting page cache as used memory.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Ignore cache — look at available. Identify the largest RSS processes and whether they grow. Limit services with MemoryMax=. Add swap only as a buffer, not a fix.
journalctl -b -p err— errors this bootsystemctl --failed— failed unitsdf -h; df -i— space and inodesss -tulpn— listening socketsdmesg -T | tail— recent kernel messages
ReferenceWhat it is1 section · depth on demand
Core model
Use memory accounting rather than free-memory intuition. Correlate MemAvailable, RSS/PSS where needed, page cache, slab, swap activity, pressure and cgroup limits with process growth and OOM evidence across time.
ReferenceImportant terms & boundaries4 sections · depth on demand
What this shows and what it does not
High Memory Usage owns cross-layer memory symptom isolation; Processes, Performance, Containers/Virtualization and application branches own deeper allocator/leak specifics.
In depth
Read /proc/meminfo the right way
$ grep -E 'MemTotal|MemAvailable|^Cached|Slab|SUnreclaim|Committed_AS|CommitLimit|SwapTotal|SwapFree|Shmem:' /proc/meminfo
MemTotal: 16303252 kB
MemAvailable: 612340 kB
Cached: 1904112 kB
Shmem: 1210332 kB
Slab: 4120304 kB
SUnreclaim: 3654120 kB
Committed_AS: 21455108 kB
CommitLimit: 10249004 kB
The kernel /proc documentation defines MemAvailable as the estimate of memory available for new applications without swapping, Slab as the kernel data-structure cache, SUnreclaim as the part of slab that cannot be reclaimed, Committed_AS as memory allocated by processes whether used or not, and VmRSS in /proc/PID/status as resident memory.
| Pattern | Diagnosis |
|---|---|
MemAvailable low, one process RSS large | Application memory — leak or sizing |
SUnreclaim large and growing | Kernel memory (driver, many sockets/inodes) — slabtop |
Shmem large | tmpfs (df -h -t tmpfs), shared memory segments (ipcs -m) |
Cached large, MemAvailable fine | Normal page cache — not a problem |
Committed_AS > CommitLimit | Overcommitted; allocations may fail with vm.overcommit_memory=2 |
Per-process view
ps -eo pid,comm,rss,vsz --sort=-rss | head
grep -E 'VmRSS|RssAnon|RssFile|RssShmem|VmSwap' /proc/<PID>/status
smem -tk -s pss # proportional set size — fair accounting of shared pages
OOM evidence
journalctl -k | grep -iE 'out of memory|oom-kill|Killed process'
systemctl show myapp -p MemoryCurrent -p MemoryMax -p MemoryPeak
cat /proc/pressure/memory
A service killed inside its cgroup (MemoryMax=) shows oom-kill with a constraint of CONSTRAINT_MEMCG; a system-wide OOM names CONSTRAINT_NONE. The fix differs: raise the unit limit vs. add RAM or reduce load.
Leak test
Sample RSS every few minutes for hours (pidstat -r -p <PID> 300). A steady slope under constant load is a leak; a plateau is the application's working set.
*The meminfo counters illustrate memory accounting and do not describe measurements from a live kernel.*
How it works at runtime
High Memory Usage is part of Linux Troubleshooting → High Memory Usage. High Memory Usage separates healthy Linux cache use from application RSS growth, anonymous/file cache, slab, shared memory, cgroup limits, reclaim pressure, swap and OOM behavior.
Topic-specific state model. High Memory Usage separates healthy Linux cache use from application RSS growth, anonymous/file cache, slab, shared memory, cgroup limits, reclaim pressure, swap and OOM behavior.
Interpretation rule. - Low free memory ≠ memory exhaustion on Linux.
- Large VIRT ≠ resident memory consumption.
- Cache usage ≠ memory leak.
- Process survived ≠ no OOM/reclaim pressure affected the workload.
Method
High memory usage — read free -h correctly: available is what matters; buff/cache is reclaimable.
free -h
ps -eo pid,user,rss,vsz,cmd --sort=-rss | head
smem -tk | tail
cat /proc/meminfo | grep -E 'MemAvailable|Slab|SReclaimable|Committed_AS|HugePages'
slabtop -o | head -15
journalctl -k | grep -i 'out of memory\|oom-kill'
cat /proc/pressure/memory
OOM killer events name the killed process and memory usage. Leaks show as steadily growing RSS; kernel slab growth (dentries/inodes) is usually reclaimable cache. cgroup limits (systemctl show app -p MemoryMax) can OOM a service while the host has free memory.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. High Memory Usage owns cross-layer memory symptom isolation; Processes, Performance, Containers/Virtualization and application branches own deeper allocator/leak specifics.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Linux Troubleshooting → High Memory Usage. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/ · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
High Memory Usage operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for High Memory Usage.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | High Memory Usage separates healthy Linux cache use from application RSS growth, anonymous/file cache, slab, shared memory, cgroup limits, reclaim pressure, swap and OOM behavior. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin symptom + exact time + host/boot/user → define scope + expected baseline → preserve original failing test → collect targeted kernel/process/service/storage/network/security/log evidence → identify first divergent boundary → make one minimal reversible change → repeat original test → verify adjacent regressions and retain before/after evidence. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | symptom + exact time → scope + baseline → reproduce original failure → collect first-party evidence → identify first failed boundary → minimal controlled change → repeat original test → regression/posture check | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | High Memory Usage troubleshooting is complete only when evidence localizes the first failed Linux boundary and the original failing workload passes after the smallest justified change; intermediate command success is not final proof. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux troubleshooting evidence can establish this proof path: symptom + exact time → scope + baseline → reproduce original failure → collect first-party evidence → identify first failed boundary → minimal controlled change → repeat original test → regression/posture check | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured host, boot, process/user, dependency, time or workload scope. High Memory Usage troubleshooting is complete only when evidence localizes the first failed Linux boundary and the original failing workload passes after the smallest justified change; intermediate command success is not final proof. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven boundary: reproduce the exact original failure, collect the owning subsystem evidence at the same time, change only the proven cause or prerequisite, then repeat the original workload and regression checks. | Continue to the next unresolved boundary while preserving the original test condition. |
High Memory Usage · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | High Memory Usage |
|---|---|
| Topic path | Linux Troubleshooting → High Memory Usage |
| Runtime state | High Memory Usage separates healthy Linux cache use from application RSS growth, anonymous/file cache, slab, shared memory, cgroup limits, reclaim pressure, swap and OOM behavior. |
| Fast checks | - Capture MemAvailable, swap, pressure/reclaim and top process/cgroup consumers over the incident window. - Distinguish anonymous RSS, mapped/file cache, slab and shared memory before attributing growth. - Check cgroup limits, oom-kill evidence, allocation failures and workload concurrency. - Remediate the proven consumer/limit, replay representative load and verify memory pressure plus workload latency/error rate. |
| Verification chain | symptom + exact time → scope + baseline → reproduce original failure → collect first-party evidence → identify first failed boundary → minimal controlled change → repeat original test → regression/posture check Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary. |
| Failure boundary | High Memory Usage troubleshooting is complete only when evidence localizes the first failed Linux boundary and the original failing workload passes after the smallest justified change; intermediate command success is not final proof. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |