Migrating Java Applications to HP-UX
23
Figure 15 GC Duration panel
(Note: When migrating your Java application from another platform, you should not have to make
modifications to the application itself. The example above is being used to illustrate HPjmeter's
functionality. It is not meant to imply that application changes are required)
Other recommendations:
The UseAdaptiveSizePolicy is intended to resize the subspaces of the java heap while the
application is running in order to improve GC behavior. Occasionally, it can cause a ping-pong
effect, where every scavenge causes the subspaces sizes to bounce back and forth. In such cases, it is
best to disable Adaptive Sizing (-XX:-UseAdaptiveSizePolicy).
When using CMS, make sure that the CMS collection is successfully cleaning out the Old space
before the Old Space gets completely full. If the Old Space gets full, the Hpjmeter will show an
"incomplete CMS" and a regular Full GC will occur. In such cases, try lowering the value at which a
CMS is initiated, using -XX:CMSInitiatingOccupancyFraction=<percent>.
For further information on garbage collection in Hotspot and using HPjmeter to optimize GC
performance, refer to the following:
Tuning Garbage Collection with the 1.4.2 Java Virtual Machine
http://java.sun.com/docs/hotspot/gc1.4.2/index.html
Tuning Garbage Collection with the 5.0 Java Virtual Machine
http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html
Java SE 6 HotSpot[tm] Virtual Machine Garbage Collection Tuning
http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html
Java Troubleshooting Guide for HP-UX Systems
http://www.hp.com/go/hpux-java-docs