opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
9.8k stars 1.82k forks source link

Introduce new env var for adding/overriding jvm options in CLI tools #836

Open Swarnim-singhal opened 3 years ago

Swarnim-singhal commented 3 years ago

Is your feature request related to a problem? Please describe.

OpenSearch currently provides the following CLI tools

All these CLI tools are invoked with default jvm args as -Xms4m -Xmx64m -XX:+UseSerialGC ${OPENSEARCH_JAVA_OPTS} which was added by this PR to close this issue.

With existing config, the same OPENSEARCH_JAVA_OPTS which are used to start the opensearch process, are also being used by CLI commands. This leads to below problems :

Describe the solution you'd like Addition of a new env variable like OPENSEARCH_CLI_JAVA_OPTS in opensearch-cli script

Describe alternatives you've considered Removal of default settings : The current default settings do make sense since we don't want to have large heap-sizes or sophisticated GC setup for simple and lightweight cli tools

Note The opensearch-cli tools mentioned here are not the ones which come with the opensearch-cli client tool, documented here

dblock commented 3 years ago

This is a good idea, PRs welcome!