RFR: 7164841: Improvements to the GC log file rotation
kirk at kodewerk.com
Tue Aug 27 01:13:42 PDT 2013
On 2013-08-27, at 10:01 AM, Bengt Rutisson <bengt.rutisson at oracle.com> wrote:
> On 8/26/13 7:01 PM, Yumin Qi wrote:
>> Thanks for your comments.
>> Yes, as you said, the purpose of rotating logs is primarily targeted for saving disk space. This bug is supplying customers another option to prevent the previous gc logs from removed by restart app without making copy. Now with this pid and time stamp included in file name, we have more options for users. It is up to user to make decision to or not to keep the logs. We cannot handle all the requests in JVM, but we can offer the choices for users I think. Any way, with either the previous rotating version, or the one I am working, the logs will not grow constantly without limit to blow storage out as long as users give enough attention.
>> My concern is for no log rotation, should we still use time stamp in file name? I have one version for this, I hope get more comments for that.
> Sorry if I wasn't clear before. I am not worried about the case when log rotation is turned on. What I was worried about was the case where a user is not using log rotation but is still piping the GC output to a file. That file will be overwritten every time the VM is restarted. If we add time stamps to the file name for this case then the file will not be overwritten. I think that is a bit of a scary change. That's all.
This falls into the category of unexpected behaviour and I would agree that unless log rotation has been specified I would not like to see the name changed.. even though I'll admit to be bitten by having a log file "accidentally" over written. That said, it would be excellent if the new %<x> macros (where it makes sense of course) could be applied to the -Xloggc flag even when rotation is not turned on.
More information about the hotspot-gc-dev