Configuring huge pages for GT.M x86[-64] on Linux

GT.M on Linux supports using huge pages (depending on the CPU architecture, typically 2MiB or 4MiB rather than the default 4KiB) for shared memory segments for BG access and for the heap of mumps processes. Using huge pages reduces the need for page tables at the cost of a slight increase in total system virtual memory usage. While your mileage may vary, FIS believes that many large applications will benefit from configuring and using huge pages. If you do not configure your system for huge pages, GT.M continues to use the default page size. Note that using huge pages requires no change whatsoever at the application code level, or even to database management operations such as replication, backup, integ, reorg, etc. - the changes discussed here pertain entirely to configuring system memory and the virtual memory manager to improve application performance.

To use huge pages:

At this time, huge pages cannot be used for MM databases; the text, data, or bss segments for each process; or for process stack.

Refer to the documentation of your Linux distribution for details. Other sources of information are:

[Note] Note
  • In order to assure predictable performance, FIS strongly recommends that you invest the effort to appropriately tune your system before using huge pages in production. For example, use of on demand huge pages (over-committing) may result in delays while the kernel performs memory management activities to satisfy requests for memory - but this may or may not be material in your situation.

  • Since the memory allocated by Linux for shared memory segments mapped with huge pages is rounded up to the next multiple of huge pages, there is potentially unused memory in each such shared memory segment. You can therefore increase any or all of the number of global buffers, journal buffers, and lock space to make use of this otherwise unused space. You can make this determination by looking at the size of shared memory segments using ipcs. Contact FIS GT.M support for a sample program to help you automate the estimate.

  • Transparent huge pages may further improve virtual memory page table efficiency. Some Supported releases automatically set transparent_hugepages to "always"; others may require it to be set at or shortly after boot-up. Consult your Linux distribution's documentation.

[Important] Important

A fatal SIGBUS error occurs when a GT.M process using huge pages tries to spawn another process and Linux does not have sufficient available huge pages to provide the required memory for the spawned process. The following involve spawning additional processes:

  • JOB

  • OPEN of a PIPE device

  • ZSYSTEM

  • interprocess signaling that requires the services of gtmsecshr when gtmsecshr is not already running

  • SPAWN commands in DSE, GDE, and LKE

  • Argumentless MUPIP RUNDOWN

  • Replication-related MUPIP commands that start server processes and/or helper processes

Depending on when huge pages become unavailable, the SIGBUS error may go to the initiating process or may only prevent the new process from starting. The solution is to tune Linux to ensure that the number of huge pages required by your application are always available to your application. Because such tuning may require a reboot, an interim workaround is to unset the environment variable HUGETLB_MORECORE for GT.M processes until you are able to reboot or otherwise make available an adequate supply of huge pages.