Add Elasticsearch memory configuration settings
What does this Merge Request do and why?
This MR has two changes in it:
- Add custom configuration for Elasticsearch JVM Heap Size
- Refactor how elasticsearch is configured to use the
config.rake
file instead of Ruby scripting
JVM Heap Size
Elasticsearch by default takes up 50% of available memory. This change overrides the minimum (Xms) and maximum (Xmx) JVM heap size and sets it to 2GB. The Xms and Xmx settings must be the same per the Elasticsearch documentation.
I believe this is enough for development due to the very small size of the Elasticsearch indexes created from the data seeded into gdk. Even after I've imported a large project, the total size of all indexes is < 1 GB.
Before / After Memory Consumption
How to test
I've tested this out locally using gdk reconfigure
and it does the following:
elasticsearch enabled: true
in gdk.yml
with - creates the configuration files if it does not exist and uses the template to populate the new file
- does not modify the file if it exists (This should be OK because if a user modifies the configuration files, they won't want them over-written after a reconfigure.)
elasticsearch enabled: false
in gdk.yml
with - does not create the configuration files
Merge Request checklist
-
This change is backward compatible. If not, please include steps to communicate to our users. -
Tests added for new functionality. If not, please raise Issue to follow-up. -
Documentation added/updated, if needed. -
gdk doctor
test added, if needed. -
Add the ~highlight
label if this MR should be included in theCHANGELOG.md
.
Edited by Terri Chu