Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI tools need their own jvm options #42021

Closed
jaymode opened this issue May 9, 2019 · 2 comments · Fixed by #44545
Closed

CLI tools need their own jvm options #42021

jaymode opened this issue May 9, 2019 · 2 comments · Fixed by #44545
Labels
:Core/Infra/Core Core issues without another label

Comments

@jaymode
Copy link
Member

jaymode commented May 9, 2019

We provide various CLI tools, most of which are lightweight and perform relatively quick operations. By default, we do not set any java options when we launch the jvm to run these tools so they run with the JDK's default options and on current JVMs the values are decided by ergonomics. On a linux machine with 64GB of ram the following options are selected by OpenJDK 12.0.1:

   size_t InitialHeapSize                          = 1056964608                                {product} {ergonomic}
   size_t MaxHeapSize                              = 16869490688                               {product} {ergonomic}

These values are in bytes and correspond to approximately a minimum of 1GB and a max of 16GB. While this might seem harmless, there are cases when these tools are run on machines where a node is already consuming almost all of the memory and the invocation of this tool triggers the oomkiller and takes down the node inadvertently.

Given this, we should provide a jvm.options file specifically for CLI tools so that they can be even more lightweight and safer to use where memory may already be an issue.

@jaymode jaymode added the :Core/Infra/Core Core issues without another label label May 9, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@rjernst
Copy link
Member

rjernst commented May 9, 2019

I'm not sure we need the configurability of jvm options for cli tools? Rather, we could use defaults for clis (or things we set explicitly, eg small heap size we set explicitly). Having these configurable would add the potential for confusion between the different options files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants