PostgreSQL shared buffers sit above the OS page cache; an OS cache hit returns memory data and avoids the lower storage path.

Postgres uses two cache layers

For ordinary buffered relation I/O, PostgreSQL’s shared buffers sit above the operating system’s file cache. A shared-buffer hit avoids another read through that lower layer; a shared-buffer miss can still be served from memory by the operating system. The same file data can occupy both caches, so this is not a promise that PostgreSQL and the kernel share one physical copy. The mmap shared-memory settings concern shared regions, not a claim that ordinary table files are directly memory-mapped. ...

January 27, 2028 · 5 min · XB Field Notes
A clock and a full capacity bin illustrate different causes of a miss. A positive TTL cannot protect an eligible key from capacity eviction.

Redis expiry is a deadline, eviction is a capacity policy

Expiration and eviction can both turn a successful lookup into a miss, but they answer different questions. Expiration follows a key’s deadline. Eviction removes eligible keys to respond to memory pressure. Extending a TTL cannot prevent capacity-driven eviction, and increasing memory cannot correct a deadline that the application set incorrectly. ...

December 26, 2027 · 6 min · XB Field Notes
Schematic equal 8 GiB ranges illustrate fewer mappings at 2 MiB than 4 KiB. Partition counts are not to scale and do not measure TLB misses.

Huge pages trade allocation flexibility for translation reach

Huge pages can increase the amount of memory covered by each cached address translation. They can reduce translation overhead for suitable workloads, but the result depends on access patterns and hardware. A large allocation alone does not prove frequent TLB misses, and fewer pages needed to describe a working set does not mean those translations all fit in the processor’s TLB. ...

December 21, 2027 · 5 min · XB Field Notes
A virtual-memory request reaches one of three overcommit admission policies before later physical demand meets cgroup, NUMA and other resource constraints.

Linux overcommit budgets virtual-memory commitments

Linux overcommit policy controls admission of certain virtual-memory commitments. It is separate from allocating resident physical pages, choosing an OOM victim, and enforcing a container’s memory limit. A successful allocation can precede physical demand, but that does not make all allocations free or guarantee that later accesses will succeed under every resource constraint. ...

December 18, 2027 · 5 min · XB Field Notes
A memory access branches to minor-fault work in memory, major-fault page-in I/O, or invalid-access handling. Fault counts do not count all storage requests.

A page fault is not always a storage read

A page fault means the processor could not complete an access using the current mapping or permissions. It is not synonymous with a storage read, and some faults represent invalid accesses rather than recoverable demand paging. Linux’s minor and major counters distinguish whether handling required page-in I/O. Interpret those counters alongside the mapping type and workload; neither is a direct measurement of all application storage traffic. ...

November 13, 2027 · 5 min · XB Field Notes
Common-scale bars compare historical approximate libc observations: allocations about 16.7 MiB after loading and 1.04 MiB after deleting all keys, with RSS about 20.8 MiB after clearing. The final ratio is about 20. These observations are not targets or proof of a leak.

Redis memory ratios need allocation context

A Redis process can keep a substantial resident footprint after application keys are deleted. That observation deserves explanation, but it does not by itself prove a leak or allocator fragmentation. The useful question is which bytes remain allocated, which pages remain resident, and whether that footprint threatens the actual capacity budget. ...

June 3, 2027 · 6 min · XB Field Notes
Swap occupancy is shown as stored cold pages, interval traffic as opposing page-transfer arrows, and memory pressure as stalled task marks. The three observations answer different questions.

Swap trades residency for reclaim cost

Swap gives Linux a backing store for eligible memory pages that need not remain resident. It can preserve cold data while RAM serves active work, but it does not make the machine’s working set fit at RAM speed. The useful question is whether reclaim frees space without repeatedly stalling important tasks. Swap occupancy, swap traffic, and application progress answer different parts of that question. ...

November 25, 2026 · 4 min · XB Field Notes
Three original-page symbols become one compressed-payload symbol plus a separate overhead symbol inside a RAM boundary. This is an illustrative ratio, not a measured capacity gain.

zram squeezes swap into RAM

When memory tightens, eligible cold pages may be reclaimed to swap. A zram swap device stores compressed pages in RAM, trading CPU work and memory overhead for potential headroom. The benefit depends on the workload; it is not a fixed amount of extra memory. ...

November 24, 2026 · 7 min · XB Field Notes