Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

High Memory Usage

Direct answer

High memory usage means available memory is low, the system swaps, or the OOM killer stops processes.

When to use this

Use it when processes are killed, the system swaps heavily, or memory keeps growing.

First 30 seconds

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.

Operational verification

processes allocate → available memory falls → swap → OOM kill

Evidence · next step

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
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Key commandjournalctl -k | grep -i 'out of memory'
Scope / prerequisiteUse it when processes are killed, the system swaps heavily, or memory keeps growing.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

5 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

observation · 1
Key points

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.

Key checks
  • journalctl -b -p err — errors this boot
  • systemctl --failed — failed units
  • df -h; df -i — space and inodes
  • ss -tulpn — listening sockets
  • dmesg -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.

PatternDiagnosis
MemAvailable low, one process RSS largeApplication memory — leak or sizing
SUnreclaim large and growingKernel memory (driver, many sockets/inodes) — slabtop
Shmem largetmpfs (df -h -t tmpfs), shared memory segments (ipcs -m)
Cached large, MemAvailable fineNormal page cache — not a problem
Committed_AS > CommitLimitOvercommitted; 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.*

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
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
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

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%
Technical changelog & impact

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.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

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.

Aliases that resolve here
linux high memorylinux memory troubleshootingoom linuxmemory pressure linux
Embedded reference data

Quick lookup tables

High Memory Usage operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for High Memory Usage.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateHigh 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 verificationPin 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 chainsymptom + exact time → scope + baseline → reproduce original failure → collect first-party evidence → identify first failed boundary → minimal controlled change → repeat original test → regression/posture checkTrace requested/configured state through effective state to the observed workload result.
Failure boundaryHigh 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 evidenceCorrelated 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 checkUse this observation only for the specific claim it actually supports.
Evidence limitIt 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 checkContinue 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 boundaryHigh Memory Usage
Topic pathLinux Troubleshooting → High Memory Usage
Runtime stateHigh 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 chainsymptom + 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 boundaryHigh 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 ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?