Metal LabsGet Access

Memory Latency Calculator

Calculate how long the CPU has to wait on L1, L2, L3 and main memory, to compute the next game server tick.

Frame time
4.70 ms
Budget 16.67 ms at 60 Hz
Headroom 72%
Max steady tick
212 Hz
If every tick cost this much
Avg load time
2.73 ns
3.7× an L1 hit
Time lost waiting
76.3%
Share of frame spent on cache misses

Where one tick's time goes

60 Hz budget
Compute 1.111 msL2 wait 0.506 msL3 wait 0.563 msMemory wait 2.516 ms

Compute is the work itself. Each coloured block is time spent waiting on a slower level of memory. The white line is the budget for your target tick rate.

Where loads are served from

LevelSize seenLatencyLoads servedWait time
L148 KB0.74 ns79.6%0.000 ms
L22 MB2.59 ns15.2%0.506 ms
L38 MB (1/4)9.26 ns3.7%0.563 ms
Memory—90.00 ns1.6%2.516 ms

Most loads hit L1. The few that reach main memory are each 50–100× more expensive, so a small slice here can be a large slice above.

Bigger working set

0.09.218.3ms64 KB1 MB32 MB1 GB64 GBL2L3

Frame time as the data touched per tick grows. Dashed lines mark where it outgrows each cache.

More neighbours on the L3

0.09.218.3ms116324864

Frame time as more instances share one CPU's L3. Riot measured VALORANT go from about 1.5 ms to 5.7 ms this way.

Only 1.57% of loads go to main memory, but they take 53.6% of the frame. That is why shrinking the working set, packing data tighter, adding cache per instance or cutting memory latency all move frame time.

How the model works and what it leaves out
  • Data is split into 64-byte cache lines whose popularity follows a power law (Zipf). The locality slider is that exponent. A cache holding the C most-used lines out of W hits a share of loads set by C, W and locality.
  • Caches are treated as non-inclusive, so L1 + L2 + this instance's slice of L3 add up to the total it can hold. The L3 slice is L3 size divided by instances sharing it.
  • Latencies: L1 4 cycles, L2 14 cycles, L3 50 cycles, main memory as set. Compute runs at 2 instructions per cycle; 30% of instructions are loads.
  • Not modelled: hardware prefetching, separate instruction cache misses, TLB misses, memory bandwidth limits, NUMA, garbage-collection pauses and jitter. Real hit rates must be measured with perf counters on your own game.
  • This is an explanatory model, not a benchmark. Use it to see the shape of the effect, then measure.

Want this measured on your game? Talk to Metal Labs.

Contact us