HP-UX Reference (11i v2 04/09) - 5 Miscellaneous Topics (vol 9)
u
unlockable_mem(5) unlockable_mem(5)
(Tunable Kernel Parameters)
NAME
unlockable_mem - amount of physical memory that may not be locked by user processes
VALUES
Default
0 pages
Allowed values
Minimum:
0 pages
Maximum: Any value less than the available physical memory.
If
unlockable_mem
is set less than or equal to 0 (such as the default value), the kernel uses the value
of:
(200 + UPAGES / 2) * (number-of-enabled-processors
)
where UPAGES is the minimum amount of pages for thread user areas, and is set to
4 on 32-bit PA-RISC
architectures, and
8 on 64-bit PA-RISC. On the Itanium(R)-based architecture,
UPAGES is the sum of the
pages needed for the RSE stack, the traditional stack, the stack red zone (between the traditional and
RSE stacks) and the size of the usual user area.
DESCRIPTION
Memory locking allows the privileged user to specify which pages need to remain in memory, and
unaffected by the swap process. This feature allows you to ensure that memory access times are
unaffected by delays introduced by memory paging and swapping. For example, locking is a tool provided
to privileged users on a system that is short on physical memory. Instead of having these privileged
processes swap like the rest of the processes, they can lock portions of their address space. Once the
pages are locked in for the privileged processes, they will no longer have to worry about memory conten-
tion. The unprivileged processes however, will have to compete for memory.
unlockable_mem provides you with a limiting factor on this privileged behavior, by setting the amount
of memory which cannot be locked by user processes.
Who is Expected to Change This Tunable?
Anyone.
Restrictions on Changing
Changes to this tunable take effect at the next reboot.
When Should the Value of This Tunable Be Raised?
This tunable should be raised on systems operating with low available physical memory where privileged
processes are using memory which would be better used by processes which are considered more impor-
tant, but which do not lock memory. Raising the tunable would force less pages locked and therefore
usable by all processes.
Notice that none of this makes any difference to the kernel itself as it can steal pages from the locked pool
when it needs to.
What Are the Side Effects of Raising the Value?
Processes which seek to lock their memory have a smaller pool to work in, and if large amounts of locked
memory are requested and the pages are simply in use, lock operations will fail. How the process handles
the failure will vary by implementation.
When Should the Value of This Tunable Be Lowered?
If the lockable memory pool is smaller than the demand, processes requesting locked memory will fail.
Lowering
unlockable_mem will provide more lockable memory.
What Are the Side Effects of Lowering the Value?
Processes which do not use locked memory will be more likely to swap since less memory is available to
the system for general usage, if privileged processes have locked the increased space in their pool.
What Other Tunable Values Should Be Changed at the Same Time?
None.
HP-UX 11i Version 2: September 2004 − 1 − Hewlett-Packard Company Section 5−−377