Skip to content
ENExplore Calculators

TLB Miss Cost Calculator

Work out tlb miss cost instantly with clear inputs, formula shown and shareable results.

About TLB Miss Cost Calculator

A TLB miss triggers a page walk of typically 3-5 dependent memory accesses, costing 50-150 cycles. Large pages attack the miss rate directly: a 2 MB page covers 512 times the memory of a 4 kB page, so the same TLB reaches a vastly larger working set.

Formula

TLB cost

cycles per 1000 instructions = accesses x miss rate x page walk cost

Worked example

With the default values below, TLB Miss Cost Calculator returns CPI added by TLB misses of 0.13680. Change any input above and every figure here is recalculated in your browser.

Inputs used

TLB miss rate
0.4 %
Page walk cost
90 cycles
Memory accesses per 1000 instructions
380 accesses
Page size
4 kB

Results

CPI added by TLB misses
0.13680 cycles
Cycles lost per 1000 instructions
136.80 cycles
TLB misses per 1000 instructions
1.52 misses
Saving with 2 MB pages
95.0% %

Step by step

  1. 1Values used
  2. 2TLB cost
  3. 3CPI added by TLB misses= 0.13680 cycles
  4. 4Cycles lost per 1000 instructions= 136.80 cycles
  5. 5TLB misses per 1000 instructions= 1.52 misses
  6. 6Saving with 2 MB pages= 95.0 %

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 or compounding frequency into account.
  • Figures are rounded for display to 5 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

Why are huge pages so effective?

TLB reach is entries times page size. Going from 4 kB to 2 MB pages multiplies reach by 512, typically eliminating TLB misses for large working sets.

What is the downside of huge pages?

Internal fragmentation and slower allocation, plus difficulty finding contiguous physical memory once the system has been up a while.

TLB Miss Cost Calculator – Calculate CPI added by TLB misses