Request for review: 6941923: RFE: Handling large logfiles produced by long running Java Applications

Rainer Jung rainer.jung at kippdata.de
Sat May 7 12:36:57 UTC 2011


I know this is not directly the topic of this page, but I think it is 
directly related: gc log files are opened for write, but not append. So 
each time the jvm is started, previous log files get overwritten. This 
is especially bad, since often when something goes wrong admins try to 
fix by restarting, thus overwriting the old gc data and making a 
posteriori analysis impossible.

Of course more advanced admins have learned, that they should not use a 
fixed file name for the gc log file name, but instead add some startup 
timestamp to the file name chosen for -Xloggc, thus starting the JVM 
with a new file each time (or copying the old file before restart).

But I expect lots of admins are still not aware of this problem.

I guess not opening the file for append was either an omission from the 
beginning, or an inadequate measure to cope with large gc logs by at 
least purging them during each JVM restart. The latter - handling large 
gc log files - is the topic of this RFE.

So I suggest to open the log files for append in order to not have 
overwritten important analytical data on each restart. I know it is an 
incompatible change of behaviour, but that part of the behaviour was 
never specified and I personally expect more users to see a benefit in 
the change than not.

Regards,

Rainer



More information about the hotspot-gc-dev mailing list