Migrating Java Applications to HP-UX
21
The "Duration" panel shows the very long Full GC times. In contrast, note the scavenges GCs are
extremely fast, as expected:
Figure 12 GC Duration Panel
A typical remedy to the problem of Full GCs occurring too often is to increase the size of the heap, in
particular the Old space. However, for the above example, increasing the heap size would have
been insufficient for solving the problem. Several improvements were made to the above application
including reducing the cache timeout so that objects do not live as long, and optimizing the cache
implementation. This resulted in substantial performance improvement as seen in Figures 13 and 14.
The Summary panel shows that the percentage time spent in GC has been reduced to 3.6%, with Full
GCs occurring every 30 minutes instead of every 70 seconds. However, the Full GC durations are
still 28 seconds on average.