Huge pages (large memory pages) are one of the most effective levers for performance tuning on systems like IBM POWER10, especially for large-memory, high-concurrency workloads.
π§ What huge pages are
Instead of standard small pages (e.g., 4 KB), huge pages use much larger sizes:
-
64 KB (common base page on POWER/AIX)
-
16 MB / 1 GB (huge pages)
π Same memory, but mapped with fewer, larger entries
β‘ 1. Massive reduction in TLB misses
Each TLB entry maps:
-
Small page β tiny memory region
-
Huge page β very large region
π Example:
-
1 GB memory:
-
4 KB pages β ~262,000 entries
-
16 MB pages β 64 entries
β‘οΈ Result:
-
Dramatically fewer TLB misses
-
Lower translation overhead
π 2. Improved high-concurrency scaling
In multi-threaded workloads:
-
Threads share limited TLB resources
-
Small pages β TLB thrashing
Huge pages:
-
Reduce pressure on shared TLB
-
Improve scalability under SMT (SMT-4 / SMT-8)
π Critical for databases and analytics
π 3. Faster page table walks
Even when a TLB miss occurs:
-
Fewer page table levels are needed
-
Less metadata to traverse
π Lower latency for translation
π§© 4. Better cache and memory efficiency
Huge pages:
-
Improve spatial locality
-
Reduce page table footprint in cache
π Benefits:
-
Less cache pollution from page tables
-
More cache available for application data
π 5. NUMA and memory affinity benefits
With huge pages:
-
Memory tends to be more contiguous
-
Easier for OS/hypervisor (e.g., PowerVM) to:
-
Maintain NUMA locality
-
Reduce fragmentation
π Better memory affinity β lower latency
π 6. Big impact on enterprise workloads
β Databases (Oracle, DB2, SAP HANA)
-
Large buffer pools
-
Fewer TLB misses β higher throughput
β Analytics / OLAP
-
Large scans
-
Better bandwidth utilization
β JVM applications
-
Reduced GC overhead (fewer pages to manage)
βοΈ Trade-offs of huge pages
π΄ 1. Memory fragmentation
-
Requires large contiguous blocks
-
Harder to allocate dynamically
π΄ 2. Reduced flexibility
-
Memory cannot be easily split or swapped
-
Over-allocation risk
π΄ 3. Allocation planning required
-
Often must be:
-
Pre-allocated
-
Tuned carefully
π οΈ Practical tuning approach
-
Identify:
-
Large, stable memory regions (DB buffer cache, JVM heap)
-
Assign:
-
Huge pages specifically to those regions
-
Leave:
-
Small pages for general-purpose memory
βοΈ Summary
| Aspect | Small Pages | Huge Pages |
|---|
| TLB pressure | High | Low |
| Translation overhead | High | Low |
| Scalability | Limited | Strong |
| Flexibility | High | Lower |
| Setup complexity | Low | Higher |
π§ Big insight
Huge pages convert:
β Many small, expensive translations
into
β
Fewer, highly efficient mappings
So instead of speeding up the CPU, they remove a hidden bottleneck (address translation)βwhich is often the real limiter in large systems.