Enabling large page support (AIX)

To enable large page support in Db2® database systems on AIX® operating systems, you must configure some operating system parameters and then set the DB2_LARGE_PAGE_MEM registry variable.

Before you begin

You must have root authority to work with the AIX operating system commands.

About this task

In addition to the traditional page size of 4 KB, the POWER7 processors (and higher) on IBM® Power Systems also support variable page sizes. Applications such as IBM Db2 version 11.1 for AIX, that require intensive memory access and that use large amounts of virtual memory can gain performance improvements by using large pages.

Note:
  1. Setting the DB2_LARGE_PAGE_MEM registry variable also implies that the memory is pinned.
  2. You should be extremely cautious when configuring your system for pinning memory and supporting large pages. Pinning too much memory results in heavy paging activities for the memory pages that are not pinned. Allocating too much physical memory to large pages degrades system performance if there is insufficient memory to support the 4 KB pages.


Restrictions

When large pages are enabled for the database memory area, the self-tuning memory manager (STMM) does not tune the overall database memory configuration. Assign a specific setting to DATABASE_MEMORY based on performance requirements. STMM tunes the internal memory areas (bufferpool, locklist, shared sort, package cache) to make optimal use of the memory that is assigned to the database memory area. For more information about DATABASE MEMORY, see database_memory.

Because database memory tuning that STMM normally performs is disabled, enabling large pages should only be considered for well-defined workloads that have relatively static database memory requirement.

Procedure

To enable large page support in Db2 database systems on AIX operating systems:

  1. Configure your AIX server for large page support by issuing the vmo command with the following flags:
    vmo -r -o lgpg_size=LargePageSize -o lgpg_regions=LargePages
    Where LargePageSize specifies the size in bytes of the hardware-supported large pages, and LargePages specifies the number of large pages to reserve.
    For example, if you want to allocate 25 GB for large page support, run the command as follows:
    vmo -r -o lgpg_size=16777216 -o lgpg_regions=1600

    For detailed instructions on how to run the vmo command, refer to your AIX manuals.

  2. Run the bosboot command so that the vmo command that you previously ran takes effect following the next system boot.
  3. After the server comes up, enable it for pinned memory.
    Issue the vmo command with the following flags:
    vmo -p -o v_pinshm=1
  4. Use the db2set command to set the DB2_LARGE_PAGE_MEM registry variable to DB, then start the Db2 database manager.
    For example:
    db2set DB2_LARGE_PAGE_MEM=DB
    db2start

Results

When these steps are complete, the Db2 database system directs the operating system to use large page memory for the database shared memory region.