A deep technical exploration of Linux page faults, mmap semantics at the physical page level, and userfaultfd for implementing lazy VM snapshot restore. The article explains how demand paging works, different mmap mapping types, KVM's multi-layer address translation, and how userspace can take over fault handling to optimize VM boot latency.
A deep dive into PostgreSQL memory management failures caused by work_mem misunderstandings: a single poorly-written query combining a plpgsql function with hash joins accumulated 2 TB of RAM because memory contexts are only released at query completion, not per-operation. The article explains root causes, introduces pg_log_backend_memory_contexts for debugging, and provides mitigation strategies including query rewrites and statement timeouts.