java 1.7.0u4 GarbageCollectionNotificationInfo API

Taras Tielkes taras.tielkes at gmail.com
Mon Jan 28 13:11:35 PST 2013


Hi,

I'm playing around with the new(ish) GarbageCollectionNotificationInfo API.
We're using ParNew+CMS in all our systems, and my first goal is a
comparison between -XX:+PrintGCDetails -verbose:gc output and the actual
data coming through the notification API. I'm using Java 1.7.0u6 for the
experiments.

So far, I have a number of questions:
1) duration times

The javadoc for gcInfo.getDuration() describes the returned value as
expressed in milliseconds. However, the values differ to the gc logs by
 several orders of magnitude. How are they calculated?

On a 1-core Linux x64 VM, the values actually look like microseconds, but
on a Win32 machines I still can't figure out any resemblance to gc log
timings.

Apart from the unit, what should the value represent? Real time or user
time?

2) CMS events with cause "No GC"

How exactly do the phases of CMS map to the notifications emitted for the
CMS collector?

I sometimes get events with cause "No GC". Does this indicate a background
CMS cycle being initiated by hitting the occupancy fraction threshold?

3) Eden/Survivor

It seems that the MemoryUsage API treats Eden and Survivor separately, i.e.
survivor is not a subset of eden. This is different from the gc log
presentation. Is my understanding correct?

In general, I think it would be useful to have a code sample for the GC
notification API that generates output as close as possible to
-XX:+PrintGCDetails -verbose:gc, as far as the data required to do so is
available.

The API looks quite promising, it seems it could really benefit from a bit
of documentation love :)

Thanks,
-tt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20130128/4dbc089f/attachment.html 


More information about the hotspot-gc-use mailing list