Understanding GC policy information displayed by GCMonitor Java Agent extension
search cancel

Understanding GC policy information displayed by GCMonitor Java Agent extension

book

Article ID: 20301

calendar_today

Updated On:

Products

CA Application Performance Management Agent (APM / Wily / Introscope) INTROSCOPE

Issue/Introduction



WebSphere Admin is starting up JVM with -Xgcpolicy:gencon, but in Introscope it looks like it is going with the default non-generational GC. According to Introscope GCMonitor metrics the GC Policy is 'Copy:MarkSweepCompact' and there is only one pool for the heap, not multiple as expected as described in the IBM documentation regarding gencon GC.

Environment

Release:
Component: APMAGT

Resolution

GCMonitor extension displays information by polling PlatformMXBeans exposed by a particular vendor's JVM implementation.

http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/management/package-summary.html

You can use JConsole utility which ships with IBM JDK to view this information outside Workstation Investigator.

Two particular PlatformMXBeans which we monitor are,GarbageCollectorMXBean(provides information on GC Collector used by JVM)
and MemoryPoolMXBean(provides info on Memory Pools used by the JVM) , which drives majority of information displayed by GCMonitor extension.

For IBM JVM's only MemoryPoolMXBean monitored by us is of type "Heap" and called "Java Heap" which is why you only see one node in Investigator.
For Sun JVM's it's same except that we also monitor PermGen which is of type "Non-Heap".

Specifying a GC Policy for IBM JVM's only controls the behavior of the application and how Garbage Collection will be performed but actual GarbageCollector or algorithm used is different for each policy.

For the gencon GC policy, two MBeans are available:

- Copy, which is for the nursery.
- MarkSweepCompact, which is for tenured memory.

For all other GC policies, only the MarkSweepCompact MBean is available. For details see

http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp?topic=%2Fcom.ibm.java.doc.diagnostics.60%2Fdiag%2Ftools%2Fmxbeans.html

"GC Policy" metric that you see in Investigator is not directly based off the value of -Xgcpolicy argument but instead based on the name of GarbageCollector used by the JVM which in case of gencon is Copy and MarkSweepCompact hence shown as Copy:MarkSweepCompact.