Abstract
Modern big-memory applications suffer from significant performance degradation due to Translation Lookaside Buffer (TLB) misses, which can account for up to 50% of execution time in data-heavy workloads. While memory coalescing—grouping contiguous pages into a single TLB entry—is a known mitigation strategy, existing methods often assume uniform contiguity. This paper introduces the K-bit Aligned TLB, a hybrid hardware-software approach designed to handle "mixed contiguity." By utilizing multi-granular entries and a speculative lookup predictor, the proposed system reduces TLB misses by an average of 27% over current state-of-the-art techniques.
Introduction
Virtual memory management relies on the TLB to cache address translations. As application data footprints scale to terabytes, the limited capacity of the TLB leads to frequent misses and costly page table walks. Coalescing contiguous virtual-to-physical mappings can increase TLB coverage without increasing physical entry counts. However, real-world workloads exhibit a chaotic blend of small, medium, and large contiguous chunks—a phenomenon termed "mixed contiguity." Traditional coalescing methods, which often target fixed sizes or assume high fragmentation, fail to exploit this diversity effectively. This research demonstrates that over 90% of real-world workloads exhibit this mixed contiguity, necessitating a more flexible architectural approach.
Methodology: The K-bit Aligned TLB
The K-bit Aligned TLB addresses mixed contiguity through a flexible, multi-granular entry system. Unlike fixed-size coalescing, it supports multiple alignment types ($K$) simultaneously, allowing the system to adapt to the specific fragmentation patterns of a running process.
Multi-Granular and Speculative Lookup
The system uses "K-bit aligned" entries where, for example, a 3-bit aligned entry represents $2^3$ (8) contiguous pages. To manage the potential latency of searching multiple alignment types in the L2 TLB, the authors implement a speculative aligned lookup mechanism.
As illustrated in the architecture above, a 4-bit predictor guesses the most likely alignment for a given virtual page number (VPN) based on recent access patterns. If the prediction is correct, the translation occurs in a single cycle, effectively hiding the latency of multi-granular searching. If the prediction fails, the system falls back to a sequential search or a page table walk.
OS-Hardware Synergy
The Operating System (OS) plays a crucial role by periodically scanning memory mappings to generate a contiguity histogram. A greedy algorithm then selects the optimal set of $K$ values to maximize coverage with minimal entry types. This offloads the complex analysis of memory patterns to the software layer (occurring infrequently), while the hardware handles high-speed translation.
Evaluation and Results
The design was evaluated using a trace-based simulator across 16 diverse benchmarks, including SPEC CPU 2006, Graph 500, and Parsec. The K-bit Aligned TLB was compared against standard Transparent Huge Pages (THP), hardware coalescing (COLT, Cluster), and the previous state-of-the-art hybrid approach, Anchor.
The results demonstrate that the $|K|=3$ Aligned configuration consistently outperforms all baselines across small, medium, large, and mixed contiguity scenarios. On average, it reduces TLB misses by 27% compared to Anchor and by 69.2% compared to the base system. In specific memory-intensive workloads like mcf, the miss reduction exceeded 96%. Furthermore, the speculative predictor achieved over 90% accuracy, ensuring that the added flexibility did not significantly penalize the Cycles Per Instruction (CPI).
Conclusion
The K-bit Aligned TLB demonstrates that acknowledging and exploiting mixed memory contiguity is essential for modern high-performance computing. By combining OS-level mapping analysis with speculative hardware lookups, the system provides significant TLB miss reduction with manageable hardware overhead. Future work may explore parallelizing page table walks with secondary TLB lookups to further mitigate misprediction penalties in extremely large memory footprints.
Summary updated