[
https://issues.apache.org/jira/browse/KAFKA-3754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15434194#comment-15434194
]
Jim Hoagland commented on KAFKA-3754:
-------------------------------------
I haven't tried it yet, but it looks like from the code that you can set
KAFKA_GC_LOG_OPTS (and do not set GC_LOG_ENABLED) before running
kafka-server-start.sh and that will be used instead of the hard-coded
KAFKA_GC_LOG_OPTS that you mention in the description. That's because
kafka-server-start.sh passes -loggc to kafka-run-class.sh. When
kafka-run-class.sh processes the -loggc, it will check if KAFKA_GC_LOG_OPTS is
empty and if not will not set GC_LOG_ENABLED to true. With GC_LOG_ENABLED not
set to true, the setting of KAFKA_GC_LOG_OPTS by the script will be bypassed.
Even so, I think that that what you get from GC_LOG_ENABLED should be made
safer.
> Kafka default -Xloggc settings should include GC log rotation flags
> -------------------------------------------------------------------
>
> Key: KAFKA-3754
> URL: https://issues.apache.org/jira/browse/KAFKA-3754
> Project: Kafka
> Issue Type: Bug
> Reporter: Ryan P
> Assignee: Ryan P
> Priority: Minor
>
> By default kafka-run-class.sh defines it's GC settings like so:
> KAFKA_GC_LOG_OPTS="-Xloggc:$LOG_DIR/$GC_LOG_FILE_NAME -verbose:gc
> -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps "
> This has to potential to generate incredibly large log files when left
> unmanaged.
> Instead it should include some sort of default GC log retention policy by
> adding the following flags:
> -XX:+UseGCLogFileRotation
> -XX:NumberOfGCLogFiles= <number of files>
> -XX:GCLogFileSize=<size of files>
> http://www.oracle.com/technetwork/java/javase/7u2-relnotes-1394228.html
> details these flags and their defaults
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)