Hugepages used for MM access method
Final Release Note
Description
Since man 2 mmap
says
MAP_HUGETLB (since Linux 2.6.32)
Allocate the mapping using "huge" pages. See the Linux kernel
source file Documentation/admin-guide/mm/hugetlbpage.rst for
further information, as well as NOTES, below.
MAP_HUGE_2MB
MAP_HUGE_1GB (since Linux 3.8)
Used in conjunction with MAP_HUGETLB to select alternative
hugetlb page sizes (respectively, 2 MB and 1 GB) on systems that
support multiple hugetlb page sizes.
More generally, the desired huge page size can be configured by
encoding the base-2 logarithm of the desired page size in the
six bits at the offset MAP_HUGE_SHIFT. (A value of zero in this
bit field provides the default huge page size; the default huge
page size can be discovered via the Hugepagesize field exposed
by /proc/meminfo.) Thus, the above two constants are defined
as:
#define MAP_HUGE_2MB (21 << MAP_HUGE_SHIFT)
#define MAP_HUGE_1GB (30 << MAP_HUGE_SHIFT)
The range of huge page sizes that are supported by the system
can be discovered by listing the subdirectories in /sys/ker‐
nel/mm/hugepages.
Especially for database files on 64-bit systems, MAP_HUGE_1GB should result in significant performance improvements, since over the current 4KiB page mapping for MM databases.
For shared memory, YottaDB can, depending on the shared memory size, choose MAP_HUGE_2MB or MAP_HUGE_1GB, and round up the number of global buffers so that the shared memory segment uses as close to a multiple of the hugetlb page size as possible.