kafka-jvm内存大小设置以及优化

[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     #根据服务器内存大小自己确定,不要超过服务器内存的80%
#   ES_JAVA_OPTS="-Xms8g -Xmx8g" ./bin/elasticsearch
#
# As a convenience, a fragment of shell is sourced in order to set one or

提到kafka优化的话,那就不知道做上面的一些修改就行了,我们看看kafka的启动文件,在启动文件的最后一行又这么一行:

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

这里调用到了kafka-run-class.sh,我们去这里面去做另外一些jvm 的优化。

你可能感兴趣的:(kafka-jvm内存大小设置以及优化)