JMC-5596: Full GC detection?
Andrew Azores
aazores at redhat.com
Mon Nov 26 17:14:47 UTC 2018
Hi everyone,
I've been looking at JMC-5596 (
https://bugs.openjdk.java.net/browse/JMC-5596 ) and reading some
background on G1 and CMS (some reading list links below for reference).
I feel I have a good handle on how JMC's rules work and I've
successfully put together a prototype new rule and have played around
with that a fair amount. In doing so I have also dug through the various
events that can be observed by an Aggregator/IItemConsumer , but I
haven't been able to determine any useful specific event that indicates
a Full GC occurrence. From my reading it seems that such an event would
emit a log message stating ex. "Full GC (GC Cause)" or "Pause Full
(Allocation Failure), but the two relevant JFR event types
(GARBAGE_COLLECTION and GC_COLLECTOR_G1_GARBAGE_COLLECTION) only report
the Cause field, corresponding to the GcCause enum and G1YCType from the
OpenJDK JFR sources. I don't know that there is a 1:1 mapping between
these causes and the Full GC event, however - in other words, AFAIK
these causes may also be listed for a minor, non-STW collection. The
other relevant type is Concurrent Mode Failure, which is detectable and
implies a Full GC for CMS, but these are already handled by the GC Stall
rule.
Is there anyone with some more background in this area who would be
willing to lend a hand and point me in the right direction? Perhaps I
simply haven't figured out the right event type to look at yet, or
perhaps the events I already have found really are 1:1 indicators of a
full collection with the right cause(s).
Reading list:
https://docs.oracle.com/javase/9/gctuning/garbage-first-garbage-collector-tuning.htm#JSGCT-GUID-0DD93225-0BCF-4605-B365-E9833F5BD2FC
https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/cms.html#concurrent_mode_failure
https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/g1_gc.html
https://www.redhat.com/en/blog/part-1-introduction-g1-garbage-collector
https://www.redhat.com/en/blog/collecting-and-reading-g1-garbage-collector-logs-part-2
Thanks in advance,
--
Andrew Azores
Software Engineer, OpenJDK Team
Red Hat
More information about the jmc-dev
mailing list