IBM BPM, V8.0.1, All platforms > Tuning > Advanced tuning > Advanced Java heap tuning

Setting the heap size for most configurations

For most production applications, the IBM JVM Java™ heap size defaults are too small and must be increased. Also, if the -Xgcpolicy:gencon option is used (as it is by default), the nursery size must be increased.

There are several approaches to setting optimal heap sizes. One approach is to set the initial heap size (-Xms option) to a reasonable value, and to set the maximum heap size (-Xmx) option to a sufficiently large value. The maximum heap size must never force the heap to page. You can use the administrative console to set both the initial heap size and the maximum heap size:

  1. In the administrative console, click Servers > Server Types > WebSphere application servers > server_name.
  2. In the Server Infrastructure section, click Java and process management > Process definition > Java virtual machine.
  3. In the Server Infrastructure section, click Java and process management > Process definition, select either Control or Servant, and then select Java virtual machine.
  4. Set the values for the heap sizes as needed.

It is imperative that the heap always stays in physical memory. The JVM then tries to keep the Generational Concurrent (GC) time within reasonable limits by growing and shrinking the heap. The output from verbosegc must then be used to monitor GC activity.

If GC is used (-Xgcpolicy:gencon), the new area size can also be set to specific values. By default, the new size is a quarter of the total heap size or 64 MB, whichever is smaller. For better performance, the nursery size must be a quarter of the heap size or larger, and it must not be capped at 64MB. New area sizes are set by JVM options: -Xmn<size>, -Xmns<initialSize>, and -Xmnx<maxSize>.

After the initial heap sizes are set, verbosegc traces must then be used to monitor GC activity. After analyzing the output, modify the heap settings accordingly.

For example, if the percentage of time in GC is high and the heap has grown to its maximum size, throughput can be improved by increasing the maximum heap size. As a rule of thumb, greater than 10% of the total time spent in GC is generally considered "high". If that increasing the maximum size of the Java heap will not always solve this type of problem because it could be due to memory overuse. Conversely, if response times are too long due to GC pause times, decrease the heap size. If both problems are observed, an analysis of the application heap usage is required.

You can use the

Advanced Java heap tuning


Related concepts:
Setting the heap size when running multiple JVMs on one system
Heap limitations: Increase the Java heap to its maximum