Need memory management help

I'm running elastic search with the elasticsearch service wrapper.

It is running with the following commandline:

Service:

/usr/local/elasticsearch/bin/service/exec/elasticsearch-linux-x86-64 /
usr/local/elasticsearch/bin/service/elasticsearch.conf
wrapper.syslog.ident=elasticsearch wrapper.pidfile=/usr/local/
elasticsearch/bin/service/./elasticsearch.pid
wrapper.name=elasticsearch wrapper.displayname=ElasticSearch
wrapper.daemonize=TRUE wrapper.statusfile=/usr/local/elasticsearch/bin/
service/./elasticsearch.status wrapper.java.statusfile=/usr/local/
elasticsearch/bin/service/./elasticsearch.java.status

Java app:

java -Delasticsearch-service -Des-foreground=yes -Des.path.home=/usr/
local/elastisearch -Djline.enabled=true -XX:+UseParNewGC -XX:
+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=8 -
XX:MaxTenuringThreshold=1 -XX:CMSInitiatingOccupancyFraction=75 -XX:
+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -
Xms128m -Xmx128m -Djava.library.path=/usr/local/elasticsearch/bin/
service/lib -classpath /usr/local/elastisearch/bin/service/lib/
wrapper.jar:/usr/local/elasticsearch/lib/elasticsearch-0.16.2.jar:/usr/
local/elasticsearch/lib/jline-0.9.94.jar:/usr/local/elasticsearch/lib/
jna-3.2.7.jar:/usr/local/elasticsearch/lib/log4j-1.2.15.jar:/usr/local/
elasticsearch/lib/lucene-analyzers-3.1.0.jar:/usr/local/elasticsearch/
lib/lucene-core-3.1.0.jar:/usr/local/elasticsearch/lib/lucene-
highlighter-3.1.0.jar:/usr/local/elasticsearch/lib/lucene-
memory-3.1.0.jar:/usr/local/elasticsearch/lib/lucene-
queries-3.1.0.jar:/usr/local/elasticsearch/lib/sigar/sigar-1.6.4.jar -
Dwrapper.key=_W0gBuF6pmW0y2lL -Dwrapper.port=32000 -
Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -
Dwrapper.disable_console_input=TRUE -Dwrapper.pid=32072 -
Dwrapper.version=3.5.6 -Dwrapper.native_library=wrapper -
Dwrapper.service=TRUE -Dwrapper.cpu.timeout=10 -Dwrapper.jvmid=1
org.tanukisoftware.wrapper.WrapperSimpleApp
org.elasticsearch.bootstrap.Bootstrap

However it is consuming 500 MB of reserved memory and 1GB of virtual
memory. As you can see the heap sizes are set to 128m (min and max).
I've tried to enable jconsole on the app by adding -
Dcom.sun.management.jmxremote to the commandline and that has no
effect either. Is the jvm somehow ignoring all these options? I'm
very confused not just because it is not acting how I want it to but
because my changes seem to have no effect on the app at all. If i
raise the memory to 2GB the size doesn't change either.

I really need help with this if anyone has any to offer.

Thanks

When you set Xms and Xmx, it affects the heap memory of the JVM, not all
the memory used by the process.

You can use the node info and stats API to see how its configured (info),
and current values (stats).

On Wed, Sep 28, 2011 at 5:09 PM, M C mcaddr@gmail.com wrote:

I'm running Elasticsearch with the elasticsearch service wrapper.

It is running with the following commandline:

Service:

/usr/local/elasticsearch/bin/service/exec/elasticsearch-linux-x86-64 /
usr/local/elasticsearch/bin/service/elasticsearch.conf
wrapper.syslog.ident=elasticsearch wrapper.pidfile=/usr/local/
elasticsearch/bin/service/./elasticsearch.pid
wrapper.name=elasticsearch wrapper.displayname=Elasticsearch
wrapper.daemonize=TRUE wrapper.statusfile=/usr/local/elasticsearch/bin/
service/./elasticsearch.status wrapper.java.statusfile=/usr/local/
elasticsearch/bin/service/./elasticsearch.java.status

Java app:

java -Delasticsearch-service -Des-foreground=yes -Des.path.home=/usr/
local/elastisearch -Djline.enabled=true -XX:+UseParNewGC -XX:
+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=8 -
XX:MaxTenuringThreshold=1 -XX:CMSInitiatingOccupancyFraction=75 -XX:
+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -
Xms128m -Xmx128m -Djava.library.path=/usr/local/elasticsearch/bin/
service/lib -classpath /usr/local/elastisearch/bin/service/lib/
wrapper.jar:/usr/local/elasticsearch/lib/elasticsearch-0.16.2.jar:/usr/
local/elasticsearch/lib/jline-0.9.94.jar:/usr/local/elasticsearch/lib/
jna-3.2.7.jar:/usr/local/elasticsearch/lib/log4j-1.2.15.jar:/usr/local/
elasticsearch/lib/lucene-analyzers-3.1.0.jar:/usr/local/elasticsearch/
lib/lucene-core-3.1.0.jar:/usr/local/elasticsearch/lib/lucene-
highlighter-3.1.0.jar:/usr/local/elasticsearch/lib/lucene-
memory-3.1.0.jar:/usr/local/elasticsearch/lib/lucene-
queries-3.1.0.jar:/usr/local/elasticsearch/lib/sigar/sigar-1.6.4.jar -
Dwrapper.key=_W0gBuF6pmW0y2lL -Dwrapper.port=32000 -
Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -
Dwrapper.disable_console_input=TRUE -Dwrapper.pid=32072 -
Dwrapper.version=3.5.6 -Dwrapper.native_library=wrapper -
Dwrapper.service=TRUE -Dwrapper.cpu.timeout=10 -Dwrapper.jvmid=1
org.tanukisoftware.wrapper.WrapperSimpleApp
org.elasticsearch.bootstrap.Bootstrap

However it is consuming 500 MB of reserved memory and 1GB of virtual
memory. As you can see the heap sizes are set to 128m (min and max).
I've tried to enable jconsole on the app by adding -
Dcom.sun.management.jmxremote to the commandline and that has no
effect either. Is the jvm somehow ignoring all these options? I'm
very confused not just because it is not acting how I want it to but
because my changes seem to have no effect on the app at all. If i
raise the memory to 2GB the size doesn't change either.

I really need help with this if anyone has any to offer.

Thanks