Script / Service: Add ES_MIN_MEM and ES_MAX_MEM, closes #156

This commit is contained in:
kimchy 2010-05-01 15:55:49 +03:00
parent d0a6342360
commit c09877c2bd
2 changed files with 13 additions and 4 deletions

View File

@ -1,9 +1,16 @@
CLASSPATH=$CLASSPATH:$ES_HOME/lib/*
if [ "x$ES_MIN_MEM" = "x" ]; then
ES_MIN_MEM=256
fi
if [ "x$ES_MAX_MEM" = "x" ]; then
ES_MAX_MEM=1024
fi
# Arguments to pass to the JVM
JAVA_OPTS=" \
-Xms128M \
-Xmx1G \
-Xms${ES_MIN_MEM}m \
-Xmx${ES_MAX_MEM}m \
-Djline.enabled=true \
-XX:+AggressiveOpts \
-XX:+UseParNewGC \

View File

@ -1,4 +1,6 @@
set.default.ES_HOME=<Path to ElasticSearch Home>
set.default.ES_MIN_MEM=256
set.default.ES_MAX_MEM=1024
#********************************************************************
# Wrapper Timeout Properties
@ -46,10 +48,10 @@ wrapper.java.additional.8=-XX:+CMSParallelRemarkEnabled
wrapper.java.additional.9=-XX:+HeapDumpOnOutOfMemoryError
# Initial Java Heap Size (in MB)
wrapper.java.initmemory=128
wrapper.java.initmemory=%ES_MIN_MEM%
# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=1024
wrapper.java.maxmemory=%ES_MAX_MEM%
# Application parameters. Add parameters as needed starting from 1
wrapper.app.parameter.1=org.elasticsearch.bootstrap.Bootstrap