Accessing more than 2.0 GB of memory on HP-UX
This section describes necessary settings to get access to more than 2.0 GB
of memory on HP-UX within a V5 process.
Background
By default, Version 5 processes on HP-UX can allocate up to approximately 1.9
GB of
memory for storing data. The 4 GB address space offered by the
operating system being split into 4 quadrants of 1 GB each; most of first 2
quadrants are reserved for private data allocations, most of last 2 quadrants
are reserved for shared objects. It is possible to
increase the default data allocation capabilities up to approximately 3.0 GB (1 GB
remains for shared objects). Such capability requires additional settings in
order to be effective :
- From an operating system standpoint
- From a Version 5 standpoint
Operating System settings
- The maxdsiz kernel parameter, which controls the amount of private data
each process can handle, should be sized to accommodate up to 3 GB of data.
Therefore maxdsiz should be set to 0xC0000000 through sam or kmtune
utilities.
- Amount of Real memory and swap space should be sized accordingly.
Increasing maxswapchunks kernel parameter may be necessary to accommodate
additional swap space.
- Increasing swap space and changing kernel parameters require root
authority.
- If running in the POSIX shell (/usr/bin/sh) make sure that ulimit data
parameters is set to unlimited.
Version 5 required customizations
Since R14 the V5 main executables are already flagged to enable the use of
the third quadrant. One can disable it by using the chatr command ( this operation requires root authority on default installation)
:
One can go back to initial behavior by restoring the original copy or
enabling the use of the third quadrant :
- run chatr command on CNEXT, in order to enable use of third quadrant for
private data
chatr +q3p enable CNEXT
Output of above command should be similar to :
...
lazy swap allocation disabled
text segment locking disabled
data segment locking disabled
third quadrant private data space enabled
fourth quadrant private data space disabled
third quadrant global data space disabled
data page size: 1M
instruction page size: 1M
nulptr references disabled
shared library private mapping disabled
shared library text merging disabled
- reset permissions on file to original permissions
chmod -w CNEXT