Migrating Java Applications to HP-UX

38
6. Top half of display gives a summary. Bottom half lists all memory regions. The java heap
regions will appear towards the top (if you sorted by VSS).
If you are migrating from Solaris or AIX, you may be accustomed to using pmap (Solaris) or
procmap (AIX) commands to look at size of the memory regions. The pmap command is also
available on HP-UX 11.31.
Threads in the Java Process
The Java process contains both Java threads (application-level) as well as internal JVM threads. The
Java application-level thread stack size is determined by the parameter -Xss<size>:
On PA, the default is 512k.
On Itanium, the stack region contains 2 parts - the memory stack and the register stack. The
default stack region is 512k of which 256k goes to the memory stack. The -Xss parameter
specifies the size of the memory stack only. When -Xss<size> is specified, the JVM will
double <size>, so the actual stack region will be 2*<size>.
For example, -Xss512k results in a stack region of 1M.
Internal JVM threads include the following: vm thread, compiler threads, parallel GC threads, watcher
thread, ...
To print the default sizes of the thread stacks, use the option:
-XX:+ThreadPriorityVerbose
On Java 5.0 and java 6
default vm thread stack size is 1M
default compiler thread stack size is 4M
In a production environment, for a long-running server application, we generally do not recommend
modifying the internal JVM thread stack sizes. For testing purposes, if you want to experiment with
reduced thread stack sizes, see the next section "Reducing Starting Footprint".
Reducing Starting Footprint
On Java 6 running on HP-UX 11.31, the initial RSS of the Java process has been improved. That is,
starting footprint (RSS) is reduced. However, for Java 5 and Java 6 on 11.23, or Java 5 on 11.31,
you can obtain a lower initial RSS by using the option:
-XX:+ForceMmapReserved
For a large, long running server application, the starting footprint or memory usage is not as
important as the longer-term steady-state memory usage. However, sometimes an application
deployment uses many little Java processes all running on one machine. In such cases, the starting
footprint of the java process becomes critical.
To lower the footprint of your java process on Itanium, you can experiment with these options:
Minimize -Xms parameter; allow -Xmx to be larger to accommodate the few processes that
will require a larger heap.