Coordinated and Efficient Huge Page Management with Ingens

Treat memory contiguity as a first-class resource; track utilization and access frequency for principled huge page management

Featured image

Venue: OSDI 2016
Slides: USENIX Slides

Topic: Current OS huge page support is built on 4KB-centric assumptions and spot fixes. Ingens redesigns huge page management on two principles: contiguity as an explicit resource, and tracking spatial/temporal access patterns.


Summary

Modern processors offer dual-level TLBs with thousands of huge page entries, but OSes still manage memory assuming 4KB pages. Current huge page support in Linux causes fairness and performance pathologies: fragmentation, memory bloat, increased page fault latency, and non-swappability. Ingens manages contiguity as a first-class resource and tracks utilization and access frequency to eliminate these pathologies.


Background

Why huge pages?

Problems with current huge page support

  1. Increased page fault latency
    • Allocating a 2MB huge page requires finding 2MB of contiguous physical memory.
    • Fragmentation forces expensive memory compaction.
    • Kernel must zero-out the entire 2MB page before giving it to a process → more time than zeroing a 4KB page.
  2. Memory bloating
    • Linux allocates a huge page on every base page fault.
    • Processes receive much more memory than they actually use → increased memory footprint.
  3. Fragmentation (internal and external)
    • Internal: portions of a huge page go unused.
    • External: free physical memory fragmented into small chunks → can’t form 2MB contiguous regions.
  4. Not swappable/migratable
    • The kernel doesn’t support swapping huge pages directly.
    • Huge pages must be demoted to base pages before swapping → performance degradation.

Key Idea

Two principles

  1. Memory contiguity is an explicit resource to be allocated across processes — not a by-product.
  2. Good information about spatial and temporal access patterns is essential — allows the OS to predict when contiguity will be profitably used.

Design

Ingens framework


Evaluation


Meeting Notes

(Note: 2016 paper — some details may be outdated given subsequent OS and hardware developments.)