Browse Source

KAFKA-3754; Add GC log retention policy to limit size of log

Add a default log retention policy to keep GC logs from growing too large

Author: Ryan P <ryan.n.pridgeon@gmail.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>

Closes #1431 from rnpridgeon/KAFKA-3754
pull/2909/merge
Ryan P 8 years ago committed by Ismael Juma
parent
commit
8d74920163
  1. 2
      bin/kafka-run-class.sh
  2. 1
      docs/upgrade.html

2
bin/kafka-run-class.sh

@ -245,7 +245,7 @@ GC_FILE_SUFFIX='-gc.log' @@ -245,7 +245,7 @@ GC_FILE_SUFFIX='-gc.log'
GC_LOG_FILE_NAME=''
if [ "x$GC_LOG_ENABLED" = "xtrue" ]; then
GC_LOG_FILE_NAME=$DAEMON_NAME$GC_FILE_SUFFIX
KAFKA_GC_LOG_OPTS="-Xloggc:$LOG_DIR/$GC_LOG_FILE_NAME -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps "
KAFKA_GC_LOG_OPTS="-Xloggc:$LOG_DIR/$GC_LOG_FILE_NAME -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M"
fi
# If Cygwin is detected, classpath is converted to Windows format.

1
docs/upgrade.html

@ -65,6 +65,7 @@ @@ -65,6 +65,7 @@
the change is minor since a message batch may consist of only a single message, so the limitation on the size of
individual messages is only reduced by the overhead of the batch format. This similarly affects the
producer's <code>batch.size</code> configuration.</li>
<li>GC log rotation is enabled by default, see KAFKA-3754 for details.</li>
</ul>
<h5><a id="upgrade_1100_new_protocols" href="#upgrade_1100_new_protocols">New Protocol Versions</a></h5>

Loading…
Cancel
Save