To understand why modern operating systems and hardware struggle with memory management, we must first look at the tax imposed by virtual memory. Every time an application accesses data, the CPU must translate a virtual memory address into a physical address in RAM. To accelerate this, CPUs cache recent translations in a hardware structure called the Translation Lookaside Buffer (TLB).
Traditionally, memory is carved into standard 4KB chunks called pages. However, as modern applications scale to gigabytes or terabytes of data, mapping memory in 4KB increments requires millions of entries, easily exhausting the TLB's capacity. When a TLB miss occurs, the CPU must perform a costly "page walk" through memory tables, stalling execution.
As shown by Manthey et al. and Deng et al., the industry's primary defense is the use of huge pages (or superpages), typically sized at 2MB or 1GB. By expanding the memory range covered by a single TLB entry, huge pages drastically reduce address translation overhead and prevent hardware stalls during unpredictable memory accesses. Furthermore, huge pages shrink the absolute size of the page tables themselves. Funke et al. demonstrate that this reduction minimizes latency and performance jitter during system-level snapshotting operations in hybrid databases, because there are orders of magnitude fewer page table entries to copy.
Yet, despite these clear advantages, systems frequently fail to sustain huge page coverage. The bottleneck is not a lack of total memory, but rather physical memory fragmentation.
The Core Conflict: Contiguity vs. Dynamism
The mechanics of a huge page require that its underlying physical RAM be completely contiguous and aligned. A 2MB huge page cannot be split across separate locations in physical memory; it requires a single, unbroken block of 2,097,152 bytes.
When a system first boots, physical memory is a clean, continuous canvas. But as applications run, they dynamically allocate and free memory of varying sizes. Over time, long-lived small allocations become scattered across the physical address space. This creates a state where a system might have gigabytes of free memory available in total, but because that memory is peppered with small, isolated 4KB allocations, the operating system cannot find a single unbroken 2MB block.
Clean Physical Memory (Capable of backing Huge Pages):
[ 2MB Contiguous Block ][ 2MB Contiguous Block ]
Fragmented Physical Memory (Huge Page Allocation Fails):
[ 4KB Free ][ 4KB Used ][ 4KB Free ][ 4KB Used ] ... (No 2MB contiguous block exists)
When the operating system cannot find sufficiently large contiguous segments, the performance benefits of huge pages are lost. As Manthey et al. observe, the system must revert to standard 4KB pages, reintroducing the exact address translation overhead huge pages were meant to solve.
How Fragmentation Manifests Across Domains
Physical memory fragmentation is a cross-cutting issue that degrades performance across entirely different layers of the computing stack:
1. Persistent and Tiered Memory Systems
Non-volatile and tiered memory architectures are highly sensitive to page sizes. Kadekodi et al. note that persistent memory file systems rely on huge pages to maximize throughput. When physical fragmentation prevents huge page allocation, the resulting address translation overhead causes substantial performance drops. Similarly, in systems that migrate pages between fast and slow memory tiers, operating at the granularity of huge pages simplifies access tracking and reduces migration overhead, according to Heo et al.. Fragmentation breaks this optimization by forcing migrations to revert to fine-grained base pages.
2. Virtualization and Hypervisors
In cloud environments, virtual machines (VMs) that run for extended periods suffer from internal memory aging. Tong et al. discovered that as guest physical pages become scattered across host memory due to fragmentation, the hypervisor struggles to manage memory efficiently. This directly increases the rate of Extended Page Table (EPT) violations, causing severe performance degradation for the underlying applications.
3. High-Throughput I/O and Networking
At multi-100-Gbps network speeds, the I/O Memory Management Unit (IOMMU) becomes a critical bottleneck. Network buffers must map virtual memory to physical addresses for Direct Memory Access (DMA). Mietke et al. show that utilizing huge pages cuts memory registration and pinning times by up to 25% by reducing the volume of metadata synchronized between the host CPU and the network adapter. Without huge pages, systems hit what Farshin et al. term the "IOTLB wall"—a performance ceiling where excessive I/O translation cache misses bottleneck network throughput.
4. Large Reasoning Models and KV Caching
In modern AI workloads, large reasoning models generate extensive internal chains of thought, causing the Key-Value (KV) cache to balloon rapidly. Ramachandran et al. highlight that standard token eviction processes frequently result in severe memory fragmentation. The resulting non-contiguous memory slots cannot be easily reused without expensive data reorganization, negating the performance benefits of cache reduction techniques in high-throughput serving environments.
Engineering Around Fragmentation
To resolve the tension between dynamic memory allocation and the strict contiguity demands of huge pages, modern systems employ two primary strategies: proactive fragmentation management and hardware-software co-design.
Hugepage-Aware Memory Allocators
Traditional memory allocators focus primarily on speed and local efficiency, which inadvertently accelerates physical fragmentation. To combat this, Hunter et al. designed a hugepage-aware allocator (TEMERAIRE) deployed across Google's data centers.
Instead of treating memory as a sea of small blocks, the allocator uses sophisticated heuristics to actively manage huge pages. When small allocations are requested, the allocator steers them into specific huge pages based on properties like the longest free range and the density of existing allocations. This creates a deliberate separation: some huge pages are densely packed with small, long-lived allocations, while others are kept entirely clean and easy to reclaim as contiguous blocks. This strategy reduced memory fragmentation by 26% and cut cycles spent on TLB misses fleet-wide.
Similarly, to bypass the IOTLB wall in high-speed networking, Farshin et al. introduced an intermediary allocator within the Linux kernel kernel space. This allocator specifically manages and maps 2-MiB or 1-GiB hugepages for network receive (RX) buffers, ensuring that high-speed network streams are guaranteed contiguous physical blocks, bypassing the standard kernel fragmentation path.
Multi-Grained Coalescing
When physical fragmentation is unavoidable and perfect 2MB contiguity cannot be achieved, systems can use opportunistic hardware-software compromises. The authors of Tamp proposed a multi-grained address translation mechanism for hybrid memory systems.
Instead of an all-or-nothing approach (either a perfect 2MB superpage or separate 4KB pages), the system modifies the address translation cache replacement policies to prioritize entries based on the volume of memory they cover. If the operating system cannot allocate a full huge page due to fragmentation, it attempts to arrange smaller pages as close to each other as possible. The hardware then dynamically coalesces these adjacent small-page entries into multi-page TLB mappings. This ensures that even in a partially fragmented physical memory space, the system recovers a significant portion of the TLB efficiency that would otherwise be entirely lost.
Key Foundational Work
Optimization and Evaluation of Hartree-Fock Application's I/O with PASSION (1997) — contributed 1 concept elements to this direction.
Accelerating time-varying hardware volume rendering using TSP trees and color-based error metrics (2000) — contributed 1 concept elements to this direction.