Migrating Java Applications to HP-UX
17
-XX:+UseConcMarkSweepGC Enable Concurrent Mark Sweep (CMS) collector
-XX:+UseParallelOldGC Enable parallel Full GC
-XX:+UseAdaptiveSizePolicy Attempt to resize subspaces to produce more optimal GC behavior
Default GC Policies and Heap Settings on HP-UX
When migrating a java application from another platform to HP-UX, make sure that the heap
parameters are comparable to your previous settings, and that you are using an equivalent or similar
GC policy. The default heap settings can differ from one platform to another, so it is better to
explicitly set your heap settings, rather than rely on the defaults.
The default GC policies on HP-UX are as follows:
JVM 142
New space: single-threaded scavenge (UseParallelGC is off by default)
Old space: single-threaded Full GC
UseAdaptiveSizePolicy is off by default.
JVM 5.0 and JVM 6.0
New space: multi-threaded scavenge (UseParallelGC is on by default)
Old space: single-threaded Full GC
UseAdaptiveSizePolicy is on by default.
There are a number of factors that affect the default heap settings used by the JVM. The default values
for heap settings may be different between 142, 5.0 and 6.0, and on Itanium versus PA-RISC.
UseParallelGC is turned on by default in 5.0, whereas it is off by default in 142. That difference
causes the default heap settings to be different.
The following are examples of default settings on HP-UX:
(e.g. on Itanium system with 24 GB of memory)
JVM 142.25
Initial heap size: 16m
Maximum heap size: 64m
JVM 150.19 and JVM 6.0.06 (with default UseParallelGC on)
Initial heap size: 384m
Maximum heap size: 1G
JVM 150.19 and JVM 6.0.06 (-XX:-UseParallelGC)
Initial heap size: 6.5m
Maximum heap size: 64m
The amount of memory available on the machine also affects the default heap settings. Finally, these
defaults can change with a new minor release of java. (Note: JVM 6.0.07 and 6.0.08 included
changes in default initial heap size. For details, see the JDK 6.0.08 release notes.) Because of these
many factors, we recommend that you explicitly set your heap parameters.
Migrating from Solaris
The JVM on Solaris is also a Hotspot-based JVM. The GC policies will be similar to those on HP-UX.
Therefore, you can map the GC policy directly.
To set your heap settings on HP-UX, if on your Solaris box, the total heap (Xmx), inital heap (Xms),
and New size (Xmn) settings are explicitly set in various scripts, then run using those same settings on