How to increase the available lockable memory on HP-UX 11i v3

Jump to: navigation, search


It was a common practice on HP-UX 11i v1 and HP-UX 11i v2 to disable pseudo-swap to increase the total available lockable memory of the system. Third party products, like Informix and Oracle Database may require large portions of lockable memory when creating locked shared memory segments to ensure that physical memory is never page-out. This usage requires 1:1 to 1:2 physical to swap device relationship to ensure process reservation is performed correctly.

HP-UX 11i v3, with the introduction of the Unified File Cache, not longer provides the ability to disable pseudo swap. The swapmem_on kernel parameter is deprecated in this release.

Instead, the undocumented lockable_mem_pct kernel parameter can be used in combination with filecache_min and filecache_max to increase the total available lockable memory of the system, as done as a prerequisite of configuration HPVM 4.x Hosts.

Increasing available Lockable Memory[edit]

A standard HP-UX 11i v3 with 12 GB of memory using standard kernel configuration will provided a little below 70% of it's memory lockable (5763608 / 8383040 * 100 = 68.75%).

# grep available /var/adm/syslog/syslog.log
Oct 21 06:21:31    cloud vmunix:     Physical: 8383040 Kbytes, lockable: 5763608 Kbytes, available: 6595768 Kbytes

Configure the HP-UX 11i v3 system following the recomendations for Integrity Virtual Machine Hosts.

Parameter Default Value Modified Value
base_pagesize 4 64
filecache_max 50% 1%
filecache_min 5% 1%
lcpu_attr 0 0
lockable_mem_pct 90% 99%
maxdsiz_64bit 4294967296 34359738368

# kctune -C "Increase Lockable Memory" \
filecache_max=1% \
filecache_min=1% \
lockable_mem_pct=99% \
     ==> Update the automatic 'backup' configuration first? y
       * The automatic 'backup' configuration has been updated.
       * Future operations will update the backup without prompting.
NOTE:    The requested changes could not be applied to the currently
         running system, for the following reasons:
         - Requested value of lockable_mem_pct rolled back
         - The requested value of lockable_mem_pct is invalid
       * The requested changes have been saved, and will take effect at
         next boot.

After reboot with the new configuration, the system provided 81.35% (6820076 / 8383040 * 100) as lockable memory.

# grep available /var/adm/syslog/syslog.log
Oct 21 06:21:31    cloud vmunix:     Physical: 8383040 Kbytes, lockable: 6820076 Kbytes, available: 6995068 Kbytes

Keep in mind that the kernel takes its own dynamic memory areas from lockable memory, so the system will never really offer 99% availability of the total physical memory.

Increasing the lockable_mem_pct parameter, extends the initial pool of lockable memory before assigning the resources to the kernel and its dynamic structures.

  • Note: Reducing the UFC to only 1% of the total physical memory may negative impact system which storage subsystem does not offer it's one memory cache, like fibre or parallel SCSI JBODs. Balance the need for UFC with the lockable memory requirements of your system.