mirror of https://github.com/apache/kafka.git
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
This commit is contained in:
parent
4a6bbd5f13
commit
8d74920163
|
@ -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.
|
||||
|
|
|
@ -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…
Reference in New Issue