Skip to content
ENExplore Calculators

Tmpfs Sizing Calculator

Work out tmpfs sizing instantly with clear inputs, formula shown and shareable results.

About Tmpfs Sizing Calculator

tmpfs lives in RAM and page cache, so its contents compete directly with application memory and can be pushed into swap. The size option is a ceiling, not a reservation, which is what makes the default of half of RAM dangerous: a process filling /dev/shm or /tmp can starve applications and trigger the OOM killer.

Formula

tmpfs sizing

limit = RAM x configured share; peak demand = application RAM + peak tmpfs usage; headroom = RAM - demand

Worked example

With the default values below, Tmpfs Sizing Calculator returns tmpfs size limit of 16.00. Change any input above and every figure here is recalculated in your browser.

Inputs used

System RAMminimum 0.1 GB
32 GB
tmpfs size as a share of RAMaccepts 1–200 %
50 %
Expected peak tmpfs usageminimum 0.001 GB
6 GB
RAM needed by applicationsminimum 0 GB
22 GB

Results

tmpfs size limit
16.00 GB
Peak memory demand
28.00 GB
RAM headroom at peak
4.00 GB
Assessment
tmpfs limit allows more than the free RAM - lower the limit to protect applications

Step by step

  1. 1Values used
  2. 2tmpfs sizing
  3. 3tmpfs size limit= 16.00 GB
  4. 4Peak memory demand= 28.00 GB
  5. 5RAM headroom at peak= 4.00 GB
  6. 6Assessment= tmpfs limit allows more than the free RAM - lower the limit to protect applications

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

Does tmpfs use swap?

Yes, pages can be swapped out under pressure, which is why it does not immediately cause OOM but does cause severe slowdowns.

Should /tmp be tmpfs?

It is fast and self-cleaning on reboot, which suits most systems. Avoid it where builds or uploads write multi-gigabyte temporary files, or set a conservative size limit.

Tmpfs Sizing Calculator – Calculate tmpfs size limit