Migrating Java Applications to HP-UX
18
HP-UX. If you are unsure of the settings, or some are not set (and relying on defaults), then collect the
GC details from the JVM running on Solaris using:
-Xloggc:loggc.solaris -XX:+PrintHeapAtGC
On HP-UX, set the -Xmx, -Xms, -Xmn parameters based on above values from Solaris, and set GC
policy to be the same as on Solaris.
Add the following to verify that your settings are comparable:
-Xloggc:loggc.hpux -XX:+PrintHeapAtGC
The PrintHeapAtGC outputs can be viewed in HPjmeter.
The following figure shows a sample screenshot of PrintHeapAtGC data in HPjmeter:
Figure 9 GC Summary panel from PrintHeapAtGC output
Migrating from IBM/AIX
The IBM JVM has a different set of GC policies than Hotspot. These policies rely on similar concepts
but do not map directly to the policies on Hotspot. Therefore, experimentation may be required to
optain optimal performance.
The following are GC policies available in IBM SDK 5.0:
-Xgcpolicy:optthruput
Optimizes for throughput (the default policy). Throughput is more important than short GC pauses.
The application is stopped each time garbage is collected.
-Xgcpolicy:optavgpause
Optimizes for pause time. Trades high throughput for shorter GC pauses by performing some of the
garbage collection concurrently, using a concurrent mark and concurrent sweep phase. The
application is paused for shorter periods.