Skip to content
ENExplore Calculators

Page Cache Sizing Calculator

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

About Page Cache Sizing Calculator

Page cache turns disk reads into memory reads, and the hit ratio is roughly the share of the working set that fits. Because a cache hit costs microseconds and a miss costs hundreds of microseconds even on NVMe, effective latency falls almost linearly with the cached share — which is why adding RAM often beats adding faster storage.

Formula

Cache effectiveness

cache available = RAM - application reservation; cached share = min(1, cache / working set); effective latency = (1 - cached share) x miss latency

Worked example

With the default values below, Page Cache Sizing Calculator returns Share of the working set cached of 80.0%. Change any input above and every figure here is recalculated in your browser.

Inputs used

Hot data working setminimum 0.001 GB
40 GB
Total RAMminimum 0.1 GB
64 GB
RAM reserved for applicationsminimum 0 GB
32 GB
Disk read latency on a cache missminimum 0.001 ms
0.8 ms

Results

Share of the working set cached
80.0%
RAM available for page cache
32.00 GB
Effective average read latency
0.1600 ms
Extra RAM to cache the whole working set
8.00 GB

Step by step

  1. 1Values used
  2. 2Cache effectiveness
  3. 3Share of the working set cached= 80.0
  4. 4RAM available for page cache= 32.00 GB
  5. 5Effective average read latency= 0.1600 ms
  6. 6Extra RAM to cache the whole working set= 8.00 GB

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 4 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

How do I find the working set size?

Measure it: the resident portion of your data files, or the size of frequently accessed database pages. Total data size overstates it badly for most workloads.

Should I disable the page cache for a database?

No, though databases with their own buffer pool use direct I/O to avoid double caching. In that case reserve the RAM for the buffer pool instead.

Page Cache Sizing Calculator | Calcrivo