This repository was archived by the owner on Aug 20, 2025. It is now read-only.
METRON-1447 Heap Size Not Set Correctly by MPack for ES 5.x #927
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The preferred way in which the heap size and other JVM options are set changed between ES 2.x and ES 5.x. The project upgraded to ES 5.x as part of #840 , but the way the heap size is set by the Mpack was not changed.
This resulted in the heap size for Elasticsearch to be set incorrectly. This also allows Elasticsearch to use up to 2G of heap when launched in the development environments, which is too much for a constrained single VM.
Changes
The user can set the heap size by populating the "heap_size" field under "Advanced elastic-jvm-options" in Ambari.
Elasticsearch also exposes a large number of other settings in this file. The entire content of the file was exposed in Ambari to allow users to also alter any other JVM options as needed.
Testing
Launch a development environment; either Ubuntu or CentOS.
Login to the node and ensure that only a single
-Xmsand-Xmxoption was passed to the JVM when launching Elasticsearch. Ensure these are both set to the default heap size of 512mb.Alter the JVM options template, save the settings, restart Elasticsearch, and ensure that the changes are reflected in the
/etc/elasticsearch/jvm.optionsfile.Pull Request Checklist
site-book/target/site/index.html: