gclog improvements

Tony Printezis Antonios.Printezis at sun.com
Mon Oct 13 14:29:23 UTC 2008


Hi. See inline.

Rainer Jung wrote:
> Hi,
> as we all know, GC logging is still vital for finding a good sizing and
> GC configuration.
> Unfortunately the gclog gets overwrittten each time the JVM starts due
> to the way the file gets opened. So in order to keep the files people
> need to add rotation commands to their start scripts. Often this doesn't
> happen and especially when emergency restarts where needed, the old
> gclog is gone.
> Any plans for changing this? Or maybe even adding log file rotation to
> the gclog?
We don't have any immediate plans for doing this. Regarding the log file 
getting overwritten, typically customers launch the JVM from a script 
and it's easy to create a unique GC log file name from a script (append 
the start time, pid, or something like that). So, that's an easy issue 
to solve...
> Furthermore: Until now there is no event based model of monitoring the
> GC and Memory data. All methods apart from logging are based on a pull
> model, that retrieves information in regular intervals. The most
> important information does not exist in regular intervals, but instead
> immediately after a GC. It would be nice to have some event based model
> (e.g. like in JVMTI), that allows to track the same data as the gc
> logging, without using the historically motivated gclog file format.
There's a trade-off. I don't like the pull method myself, given that it 
can skip events, give you inconsistent information, etc. But, to get 
consistent information you generally have to do a STW pause, and this is 
too much of an overhead for an application in production. This is why a 
lot of the monitoring has been implemented asynchronously.

> Thanks for your helpful and transparent comments on the mailing lists.
> Regards,
> Rainer

| Tony Printezis, Staff Engineer    | Sun Microsystems Inc.          |
|                                   | MS BUR02-311                   |
| e-mail: tony.printezis at sun.com    | 35 Network Drive               |
| office: +1 781 442 0998 (x20998)  | Burlington, MA01803-0902, USA  |
e-mail client: Thunderbird (Solaris)

More information about the hotspot-gc-dev mailing list