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

How to increase JVM heap size? #45

Open
desertSniper87 opened this issue Jun 20, 2024 · 3 comments
Open

How to increase JVM heap size? #45

desertSniper87 opened this issue Jun 20, 2024 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@desertSniper87
Copy link

How to increase the JVM heap size from 512m to 1G?

The official docs say this to pass as environment variable -Xms1g -Xmx1g: https://www.elastic.co/guide/en/elastic-stack-get-started/current/get-started-stack-docker.html#docker-enroll-nodes

@desertSniper87 desertSniper87 added the documentation Improvements or additions to documentation label Jun 20, 2024
@desertSniper87
Copy link
Author

We can change the heap size by editing docker-compose.yml and passing ES_JAVA_OPTS environment variable to elasticsearch container.

  elasticsearch:
   ...
    environment:
+     - ES_JAVA_OPTS=-Xmx1g -Xms1g

Added a pull request to change the readme #46 (comment)

@peasead
Copy link
Owner

peasead commented Jul 2, 2024

I think those are legacy docs. If you look you can see it's for version 8.2.

Looking here at 8.14 (the current version), it says

By default, Elasticsearch automatically sets the JVM heap size based on a node’s roles and total memory. Using the default sizing is recommended for most production environments.

Do you see something that recommends adjusting the heap size in 8.14?

@peasead
Copy link
Owner

peasead commented Jul 2, 2024

Also, is this different than what's in the docker-compose.yml file?

mem_limit: ${MEM_LIMIT}
ulimits:
memlock:
soft: -1
hard: -1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants