Skip to content
ENExplore Calculators

OOM Risk Estimate Calculator

Work out oom risk estimate instantly with clear inputs, formula shown and shareable results.

About OOM Risk Estimate Calculator

The OOM killer fires when the kernel cannot reclaim enough memory, which happens once demand exceeds RAM plus swap. With overcommit_memory set to 2, the kernel refuses allocations beyond swap plus a share of RAM instead, converting a random process kill into a clean allocation failure — which is usually preferable for predictable behaviour.

Formula

OOM thresholds

physical capacity = RAM + swap; CommitLimit = swap + RAM x overcommit ratio; OOM when demand exceeds physical capacity

Worked example

With the default values below, OOM Risk Estimate Calculator returns Headroom against RAM plus swap of 1.00. Change any input above and every figure here is recalculated in your browser.

Inputs used

Total RAMminimum 0.1 GB
16 GB
Swap spaceminimum 0 GB
4 GB
Peak memory demandminimum 0.001 GB
19 GB
Overcommit ratio settingaccepts 0–500 %
50 %

Results

Headroom against RAM plus swap
1.00 GB
CommitLimit under strict overcommit
12.00 GB
RAM plus swap
20.00 GB
OOM risk assessment
Elevated - peak spills into swap, expect severe slowdown before OOM

Step by step

  1. 1Values used
  2. 2OOM thresholds
  3. 3Headroom against RAM plus swap= 1.00 GB
  4. 4CommitLimit under strict overcommit= 12.00 GB
  5. 5RAM plus swap= 20.00 GB
  6. 6OOM risk assessment= Elevated - peak spills into swap, expect severe slowdown before OOM

Assumptions and limits

  • The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Can I choose which process gets killed?

Yes, via oom_score_adj per process. Lowering it protects a critical database; raising it makes a cache or batch worker the preferred victim.

Does swap prevent OOM?

It delays it, at the cost of severe latency once thrashing starts. Many operators prefer a small swap so the system fails fast rather than becoming unusably slow.

OOM Risk Estimate Calculator | Calcrivo