kafka-jvm內(nèi)存大小設(shè)置以及優(yōu)化

[root@soa-prod-elasticsearch-010171107044 /usr/local/services/elasticsearch-5.1.2/bin] 21:34:31 0

vim elasticsearch

#!/bin/bash

# CONTROLLING STARTUP:
#
# This script relies on few environment variables to determine startup
# behavior, those variables are:
#
#   ES_CLASSPATH -- A Java classpath containing everything necessary to run.
#   ES_JVM_OPTIONS -- Path to file containing JVM options
#   ES_JAVA_OPTS -- External Java Opts on top of the defaults set
#
# Optionally, exact memory values can be set using the `ES_JAVA_OPTS`.
# Note that the Xms and Xmx lines in the JVM options file must be
# commented out. Sample format include "512m", and "10g".
ES_HEAP_SIZE=16G     #根據(jù)服務(wù)器內(nèi)存大小自己確定,不要超過服務(wù)器內(nèi)存的80%
#   ES_JAVA_OPTS="-Xms8g -Xmx8g" ./bin/elasticsearch
#
# As a convenience, a fragment of shell is sourced in order to set one or

提到kafka優(yōu)化的話,那就不知道做上面的一些修改就行了,我們看看kafka的啟動文件,在啟動文件的最后一行又這么一行:

exec $base_dir/kafka-run-class.sh $EXTRA_ARGS kafka.Kafka "$@"

這里調(diào)用到了kafka-run-class.sh,我們?nèi)ミ@里面去做另外一些jvm 的優(yōu)化。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容