JVM GC Test

Manual memory management is time consuming, and error prone. Most programs still contain leaks. This is all doubly true with programs using exception-handling and/or threads. Garbage collection (GC) is a part of WebLogic's JVM that automatically determines what memory a program is no longer using, and recycles it for other use. It is also known as "automatic storage (or memory) reclamation''.  The JVMGCTest reports the performance statistics pertaining to the JVM's garbage collection.

Target of the test : A WebLogic Application Server

Agent deploying the test : An internal agent

Outputs of the test : One set of results for every GC.

Configurable parameters for the test
Parameter Description

Test period

How often should the test be executed

Host

The IP address of the WebLogic server.

Port

The port number of the WebLogic server.

JRE Home

The path to the directory in which the JVM to be monitored exists.

LogFileName

The full path to the log file which stores the GC output.

Detailed Diagnosis

To make diagnosis more efficient and accurate, the eG Enterprise embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option.

The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled:

  • The eG manager license should allow the detailed diagnosis capability
  • Both the normal and abnormal frequencies configured for the detailed diagnosis measures should not be 0.
Measurements made by the test
Measurement Description Measurement Unit Interpretation

Number of GC

The number of times garbage collection has happened.

Number

If adequate memory is not allotted to the JVM, then the value of this measure would be very high. A high value of this measure is indicative of a high frequency of GC. This is not a good sign, as GC, during its execution, has the tendency of suspending an application, and a high frequency of GC would only adversely impact the application's performance. To avoid this, it is recommended that you allot sufficient memory to the JVM.

The detailed diagnosis of the Number of GC measure, if enabled, provides details such as the heap size before GC was performed, the heap size after GC was performed, and the total time spent by the JVM in garbage collection. The difference between the heap sizes will help administrators figure out how effective GC is. The total GC time will help administrators gauge how severely GC has impacted application performance

Total GC time

The sum of the time taken by all garbage collections.

Secs

If adequate memory is not allotted to the JVM, then the value of this measure would be very high. This is not a good sign, as GC, during its execution, has the tendency of suspending an application, and a high value of this measure would only adversely impact the application's performance. To avoid this, it is recommended that you allot sufficient memory to the JVM.

Avg GC frequency

The frequency with which the JVM performed GC.

Sec

If adequate memory is not allotted to the JVM, then the value of this measure would be very low. A low value of this measure is indicative of a high frequency of GC. This is not a good sign, as GC, during its execution, has the tendency of suspending an application, and a high frequency of GC would only adversely impact the application's performance. To avoid this, it is recommended that you allot sufficient memory to the JVM.

Avg GC pause

The average time the application is suspended while garbage collection is in progress.

Secs

If the garbage collection takes more time to complete, then it indicates a very high memory allocation to the JVM. This again hinders application performance.

Avg GC overhead

The percentage of time utilized by the JVM for garbage collection

Percent

By carefully examining the application behavior in terms of memory utilization, you should arrive at an optimal ratio of the number of times the GC needs to run and how long it should take to complete. Accordingly, memory allocation to the JVM can be performed.

Max GC pause

The maximum time spent by the JVM on garbage collection, during the last measurement period

Secs

 

Avg heap before GC

The average heap size prior to garbage collection

KB

 

Avg heap after GC

The average heap size after garbage collection

KB

The difference between the value of this measure and the Avg heap before GC measure provides the amount of memory that has been released by GC. This value is a good indicator of the effectiveness of GC.