Setting the heap size for most configurations

This section contains guidelines for determining the appropriate Java heap size for most WBI configurations.

For many applications, the default heap size setting for the IBM JVM is sufficient for good performance. In general, the HotSpot JVM default Heap and Nursery sizes are too small. To set the optimal heap size for the IBM JVM on AIX, follow these guidelines.

In order to effectively use rate-trigger heap growth just set the -ms to 64MB or 96MB, and the -mx to 256-512MB. Ensure that -mx does not force the heap to page. The JVM will try to control the GC time by growing and shrinking the heap. The output from -verbose:gc monitors the GC actions.

A similar process can be used to set HotSpot heaps. In addition to setting the minimum and maximum heap size, one should also increase the Nursery size to approximately 1/4 of the heap size.

Note:
Note that one should never increase the Nursery to more than 1/2 the full heap.
The nursery size is set using the MaxNewSize andNewSize parameters (i.e., -XX:MaxNewSize=128m, -XX:NewSize=128m).

Once the heap sizes are set, verbose:gc traces monitor the GC actions. If the percentage of time in GC is too high and the heap has grown to its maximum, increase -mx.

Note:
This setting will not always solve the problem, which is normally a memory over-usage problem. If pause time is too long then decrease heap size. If both problems are observed, analyze the application heap usage.

Copyright IBM Corp. 1997, 2003