Guidelines

For a healthy heap, minor collections should dominate major garbage collections. If the number of minor collections is too small compared to the number of major garbage collections, the young generation of the heap may be too small.

If the heap size shown by garbage collections converges towards the heap limit, the application has run out of memory, or soon will run out.

If the old generation is too small, the application will run out of memory. If the total heap size is too large compared to available physical memory, thrashing occurs.

A value of 5 percent or less of time spent in garbage collection is acceptable. Values larger than 10 percent usually indicate an opportunity for improvement.

With a time span of more than one hour, you can identify possible memory leaks. See Determining the Severity of a Memory Leak (page 43).

Details

Each point on the graph represents the heap size after a garbage collection completes; it represents the amount of live memory at that time.

Frequent long garbage collections represent a potential problem, and will be coupled with a high percentage of time spent in garbage collection. This percentage is displayed in the lower right of the window.

Related Topics

Identifying Excessive Calls to System.gc() (page 41)

Determining the Severity of a Memory Leak (page 43)

Checking for Long Garbage Collection Pauses (page 40)

Reviewing the Percentage of Time Spent in Garbage Collection (page 41)

Checking for Proper Heap Sizing (page 43)

JMX Memory Tab (page 49)

Obtaining Garbage Collection Data (page 80)

Basic Garbage Collection Concepts (page 87)

Using Specialized Garbage Collection Displays (page 157)

GC Duration

Displays the duration of each garbage collection noted.

Guidelines

Expect collection times to vary with the size of the heap; the larger the heap, the longer duration a normal GC will be.

Collection times that are shorter or longer than expected for the heap size can indicate that tuning garbage collection could improve performance.

124 Using Visualizer Functions