Low Latency Optimization: Understanding Huge Pages (Part 1)
Nov 28, 2022ndepalo

Summary
This post introduces the concept of huge pages (2MiB and 1GiB) on x86 Linux systems as a low-latency optimization technique. It explains the mechanics of virtual-to-physical address translation, the role of page tables, and the latency introduced by frequent TLB misses with standard 4KiB pages. The benefits of huge pages are detailed, including reduced TLB pressure, smaller page tables, and faster page table lookups. A benchmark comparing a 32GiB array manipulation with and without huge pages shows a significant performance improvement, particularly for random accesses.