Huge pages

NoteThis feature is available only on Linux pSeries.

The CPU-Cache translation lookaside buffer (TLB) stores information about conversions from an virtual page address to the physical page address, and every byte access to physical memory requires a conversion (called a “cache miss”). Although these cache misses are very expensive, you can improve the TLB hits is by enabling “huge pages.”

Once enabled, huge pages use fewer pages to cover the physical address space, so the size of “book keeping” (mapping from the virtual to the physical address ) decreases, requiring fewer entries in the TLB and improving the system performance.

To enable huge pages, start Adaptive Server with traceflag 1653. Adaptive Server adjusts its shared memory up to the nearest multiple of 256MB. For example, if you configure Adaptive Server with 800MB of shared memory, it is rounded off to 1GB (some versions of Linux do not allow you to allocate huge pages if the size is not a multiple of Hugepagesize).

Before you enable huge pages on Adaptive Server, check /proc/meminfo to make sure Linux already has huge pages configured:

cat /proc/meminfo
....
HugePages_Total:    32
HugePages_Free:     32
Hugepagesize:    16384 kB

When Adaptive Server starts with traceflag 1653, it writes this message to the error log:

Creating shared memory with SHM_HUGETLB flag enabled

NoteMemory you allocate for huge pages is used for the shared memory only. If you allocate too many huge pages, this may lead to Adaptive Server excessively swapping physical pages. You should only allocate the required number of huge pages.