Documentation
Systematic database kernel knowledge, from storage engine to distributed systems
Hardware
- Hardware and Databases: Why Engineers Must Understand HardwareDatabase performance is bounded by hardware. Understanding how CPUs, memory, SSDs, and HDDs work explains the design of storage and query engines
- How CPUs WorkUnderstand the CPU: instruction cycles, pipelines, cache hierarchy, cache lines and locality, branch prediction, SIMD, and how they affect database performance
- How Memory WorksUnderstand DRAM: capacitive storage cells, refresh, row/column addressing, memory channels and bandwidth, NUMA, and their relationship to the database buffer pool
- How SSDs WorkUnderstand NAND Flash: floating-gate transistors, page/block structure, FTL mapping, write amplification, wear leveling and TRIM, and their impact on database writes
- How HDDs WorkUnderstand hard disk drives: platters, tracks, sectors, actuator arms, seek time, rotational latency and transfer time, plus IOPS calculation and their effect on random reads
- How HDDs Work (Database Kernel Perspective)A database-kernel-engineer view of HDDs: addressing and sector alignment, end-to-end read/write paths, write cache and fsync durability semantics, the SMR landmine, NCQ and queue depth, tail latency and error handling
Parser
Storage Engine
- Storage Engine OverviewUnderstanding the core concepts of database storage engines: page management, file organization, buffer pools, and WAL
- Buffer Pool ManagementUnderstanding buffer pool design and implementation: page pinning, replacement algorithms, concurrency control, and prefetching
- Page Layout: Slotted PagesUnderstanding Slotted Pages design: variable-length field handling, row offset arrays, and comparisons with alternative page layouts