I dreamt of writing a book for as long as I can remember, wrote many outlines, but none materialised.
Then I started writing this article on virtual memory, which kept getting longer and longer and turned into an unplanned book.
Based on all the positive feedback, I recently published it on Amazon as well. Somehow, it is showing up as the #1 bestseller in its category on Amazon India :D.
Maybe it says something about how niche these categories are, but it still feels surreal.
Before jumping into books like DDIA or Database Internals, it helps to understand the systems layer these designs are built on.
A lot of the design of such data-intensive systems is based on virtual memory: page tables, page faults, mmap, the page cache, swapping, NUMA placement, TLBs, and the tradeoffs between what the OS wants and what the database wants.
My latest article is a ~25,000-word mini-book on virtual memory.
It starts from first principles and goes all the way down to advanced topics like NUMA placement and performance debugging with tools like perf and /proc.
I also wrote it differently: as a dialogue between a user-space process and the kernel.
Most treatments of virtual memory are dry and fact-heavy. I wanted this one to feel more like a story, while still being technically deep.
Link below.