Using the garbage collection perspective

The heap usage, pause times, summary table, and tuning recommendation sections in the Health Center garbage collection perspective.

The Health Center garbage collection perspective has the following sections:

Heap usage

Use the graph of heap usage to identify trends in application memory usage. If the memory footprint is larger than expected, a heap analysis tool can identify areas of excessive memory usage. If the used heap is increasing over time, the application might be leaking memory. A memory leak happens when Java™ applications hold references to objects that are no longer required. Because these objects are still referenced, they cannot be garbage collected and contribute to memory requirements. As the memory consumption grows, more processor resources are required for garbage collection, leaving fewer for application work. Eventually the memory requirements can fill the heap, leading to an OutOfMemoryError exception, and an application failure.

When monitoring a WebSphere® Real Time for Linux® JVM, you see a used heap graph that has a typical pattern of regular spaced collections, like the following screen capture.

Used heap graph, WebSphere Real Time

Pause times

Use the graph of pause times to assess the performance affect of garbage collection. When garbage collection is running, all application threads are paused. For some applications, such as batch-processing, long pauses are not a problem. For other applications, such as GUI applications or applications that interact with other systems, long garbage collection pauses might not be acceptable.

Longer garbage collection pauses are often associated with better application throughput and are not a performance problem. Spending extra time in garbage collection can often lead to improved memory allocation and memory access times. The aim of garbage collection tuning is to have reduced pause times only if low response times are required.

Summary table

The summary table shows garbage collection metrics, including mean pause time, mean interval between garbage collections, and the amount of time spent in garbage collection. The time an application spends in garbage collection must not be taken as a performance metric itself. Some garbage collection policies, such as the generational concurrent (gencon) policy, can take more time in garbage collection but still provide improved application performance.

Tuning recommendations

The Health Center provides general tuning recommendations and advice. In exceptional cases, further fine-tuning might be required. The Health Center does not know what your quality of service requirements are, therefore the recommendations are not always useful. For example, a suggested change might improve application efficiency but increase pause times, which might not be best for your application. The tuning recommendations also indicate if the application seems to be leaking memory. However, the Health Center cannot distinguish between naturally increasing memory requirements and memory that is being held when it is no longer required.

Object allocations

Use the object allocations view to identify which code is allocating large objects. You can use low and high-threshold values to specify the object range that triggers collection of the call stack information.

The view displays a table showing the following information:
  • The size of the allocated object.
  • The time of allocation.
  • The code location of the allocation request.
Select a row in the table to display the call stack contents at the time of the selected allocation request.

Controlling the collection of object allocation data

When the Health Center is connected to a live agent, the following controls are available in the object allocation view:
A check box to enable the collection of object allocation call stacks
By default, collection is not enabled.
Stack trace depth
This control limits the collection of data to the specified number of stack entries. By default, five stack entries are collected.
Low threshold value
Data is collected for allocations of objects that are larger than the value specified.
High threshold value
Data is collected for allocations of objects that are smaller than the value specified.
You can specify the threshold values using bytes, kilobytes, or megabytes. The precise format of a value is nnnn[k|m], where nnnn is the numeric value, k is an optional indicator for kilobyte, and m is an optional indicator for megabyte. For example:
  • 4096 is the value 4096 bytes.
  • 830k is the value 830 kilobytes.
  • 2m is the value 2 megabytes.

Viewing data for a particular time period

You can select the time interval for displaying data, and making recommendations, by using cropping. For further information about cropping, see Cropping data.



© Copyright IBM Corporation 2005, 2010. All Rights Reserved.
© Copyright Sun Microsystems, Inc. 1997, 2007, 901 San Antonio Rd., Palo Alto, CA 94303 USA. All rights reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
This information center is powered by Eclipse technology. (http://www.eclipse.org/)