Work out page cache sizing instantly with clear inputs, formula shown and shareable results.
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.
Cache effectiveness
cache available = RAM - application reservation; cached share = min(1, cache / working set); effective latency = (1 - cached share) x miss latency
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.
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.