2010-07-07 10:15:26 -04:00
|
|
|
CLASSPATH=$CLASSPATH:$ES_HOME/lib/elasticsearch-@ES_VERSION@.jar:$ES_HOME/lib/*:$ES_HOME/lib/sigar/*
|
2010-02-08 08:30:06 -05:00
|
|
|
|
2010-05-01 08:55:49 -04:00
|
|
|
if [ "x$ES_MIN_MEM" = "x" ]; then
|
2010-06-30 14:51:34 -04:00
|
|
|
ES_MIN_MEM=256m
|
2010-05-01 08:55:49 -04:00
|
|
|
fi
|
|
|
|
if [ "x$ES_MAX_MEM" = "x" ]; then
|
2010-06-30 14:51:34 -04:00
|
|
|
ES_MAX_MEM=1g
|
2010-05-01 08:55:49 -04:00
|
|
|
fi
|
|
|
|
|
2010-02-08 08:30:06 -05:00
|
|
|
# Arguments to pass to the JVM
|
2010-08-13 18:10:36 -04:00
|
|
|
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"
|
|
|
|
|
2010-11-06 18:46:46 -04:00
|
|
|
# Enable aggressive optimizations in the JVM
|
2010-08-13 18:10:36 -04:00
|
|
|
JAVA_OPTS="$JAVA_OPTS -XX:+AggressiveOpts"
|
|
|
|
|
2010-11-06 18:46:46 -04:00
|
|
|
# Enable reference compression, reducing memory overhead on 64bit JVMs
|
|
|
|
# - Disabled by default as it is not stable for Sun JVM before 6u19
|
|
|
|
#JAVA_OPTS="$JAVA_OPTS -XX:+UseCompressedOops"
|
|
|
|
|
2010-08-13 18:10:36 -04:00
|
|
|
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"
|
2010-10-15 12:26:38 -04:00
|
|
|
JAVA_OPTS="$JAVA_OPTS -XX:CMSInitiatingOccupancyFraction=75"
|
|
|
|
JAVA_OPTS="$JAVA_OPTS -XX:+UseCMSInitiatingOccupancyOnly"
|
|
|
|
|
2010-08-13 18:10:36 -04:00
|
|
|
JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError"
|
|
|
|
JAVA_OPTS="$JAVA_OPTS -XX:HeapDumpPath=$ES_HOME/work/heap"
|