HP-UX Reference (11i v2 04/09) - 5 Miscellaneous Topics (vol 9)
a
Aries(5) Aries(5)
(Itanium(R)-based System Only)
256 MB (-ssz) + 512 MB (-heap_ssz) + 64 MB (-ccsz) + 33 MB = 865 MB
PA-RISC APPLICATION THREADS EMULATION UNDER ARIES
Calculating the Required Size of the Aries Heap
To emulate PA-RISC application’s threads, Aries needs to create its own native threads whenever a PA-
RISC application creates new threads. To create new threads, Aries needs to allocate memory to accom-
modate thread specific data, thread stack, and thread backing store area for the new thread. Memory
requirement for thread creation in Aries is as follows:
• For 32-bit Aries: 214 KBytes
• For 64-bit Aries: 280 KBytes
Apart from the memory required to allocate new threads, Aries needs about 8 MB for its internal dynamic
data structures allocation. Thus the required amount of space for the Aries heap is calculated as follows:
Required Aries Heap Size =
8192 KB + (No of PA-RISC application threads) *
(Memory required to allocate one Aries thread, in KB)
Maximum Number of Threads that Aries Can Create
For a PA-RISC test application which just creates new threads and does not do much computation, Aries
requires a very small amount of memory (less than 1 MB) for its internal dynamic data structures alloca-
tion. Such an application can create a maximum of 86 threads under 32-bit Aries with the default value
of the kernel tunable parameter
pa_maxssiz_32bit
and default values of the 32-bit Aries parameters.
The same application can create a maximum of 500 threads under 64-bit Aries with the default value of
the kernel tunable parameter
pa_maxssiz_64bit
and default values of 64-bit Aries parameters.
Note that Aries does not depend on the value of the kernel tunable parameter
max_thread_proc
for
maximum number of threads per PA-RISC process. Check to see that the value of your kernel tunable
parameter
max_thread_proc is not less than the required number of threads that your PA-RISC
application needs to create. This makes sure that the kernel allows the PA-RISC application to con-
currently execute more numbers of threads than what is permitted according to default value of
max_thread_proc.
If your PA-RISC application needs to create a larger number of threads than the maximum number of
threads that can be created with default values of Aries parameters and the kernel tunable parameter
pa_maxssiz_32|64bit
, then increase the Aries heap size by specifying the -heap_ssz option in the
Aries resource configuration file.
NOTE: The amount of free memory available in AMA on account of reducing a PA-RISC application’s
stack size (Aries option
-ssz) cannot be automatically used by Aries to allocate more space to the Aries
heap. To change the Aries heap size, you must set the Aries option -heap_ssz
in the Aries resource
configuration file.
Emulating MxN Threads
Aries supports PA-RISC applications which are linked with the MxN pthreads library. With this release
of HP-UX, the PA-RISC MxN pthreads library is delivered on Itanium-based system.
A future release of Aries may have support for true emulation of MxN pthreads. Until that time, Aries
supports emulation of PA-RISC HP-UX applications linked with MxN pthreads library in traditional 1x1
mode. Aries achieves this by internally setting the environment variable
PTHREAD_COMPAT_MODE to 1.
EMULATING PA-RISC APPLICATION STACK UNDER ARIES
The stack allocated by the Itanium-based HP-UX kernel is used by Aries as its own native stack. Aries
allocates the stack for PA-RISC applications from AMA. Most PA-RISC applications run as expected with
default stack size set by Aries. However, if your PA-RISC application fails with core dump, with the fol-
lowing error message, then you should increase the PA-RISC application stack size by using Aries option
-ssz in the Aries resource configuration file.
ARIES32|64 Limitation/Error
PID xxxxx received SIGSEGV for stack growth failure
Possible causes - insufficient memory or swap space,
or stack size exceeded pa_maxssiz_32|64bit
Section 5−−48 Hewlett-Packard Company − 9 − HP-UX 11i Version 2: September 2004