29 lines
917 B
Bash
29 lines
917 B
Bash
CLASSPATH=$CLASSPATH:$ES_HOME/lib/elasticsearch-@ES_VERSION@.jar:$ES_HOME/lib/*:$ES_HOME/lib/sigar/*
|
|
|
|
if [ "x$ES_MIN_MEM" = "x" ]; then
|
|
ES_MIN_MEM=256m
|
|
fi
|
|
if [ "x$ES_MAX_MEM" = "x" ]; then
|
|
ES_MAX_MEM=1g
|
|
fi
|
|
|
|
# Arguments to pass to the JVM
|
|
JAVA_OPTS="$JAVA_OPTS -Xms${ES_MIN_MEM}"
|
|
JAVA_OPTS="$JAVA_OPTS -Xmx${ES_MAX_MEM}"
|
|
JAVA_OPTS="$JAVA_OPTS -Xss128k"
|
|
|
|
JAVA_OPTS="$JAVA_OPTS -Djline.enabled=true"
|
|
|
|
JAVA_OPTS="$JAVA_OPTS -XX:+AggressiveOpts"
|
|
|
|
JAVA_OPTS="$JAVA_OPTS -XX:+UseParNewGC"
|
|
JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC"
|
|
JAVA_OPTS="$JAVA_OPTS -XX:+CMSParallelRemarkEnabled"
|
|
JAVA_OPTS="$JAVA_OPTS -XX:SurvivorRatio=8"
|
|
JAVA_OPTS="$JAVA_OPTS -XX:MaxTenuringThreshold=1"
|
|
JAVA_OPTS="$JAVA_OPTS -XX:CMSInitiatingOccupancyFraction=75"
|
|
JAVA_OPTS="$JAVA_OPTS -XX:+UseCMSInitiatingOccupancyOnly"
|
|
|
|
JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError"
|
|
JAVA_OPTS="$JAVA_OPTS -XX:HeapDumpPath=$ES_HOME/work/heap"
|