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

Prevent elasticsearch from using swap #181

Open
mrdavidlaing opened this issue Sep 14, 2015 · 1 comment
Open

Prevent elasticsearch from using swap #181

mrdavidlaing opened this issue Sep 14, 2015 · 1 comment

Comments

@mrdavidlaing
Copy link
Member

Although we set bootstrap.mlockall: true in the elasticsearch config, it doesn't appear to be working, since I get the following WARN in the elasticsearch node logs:

[2015-09-14 06:33:51,181][WARN ][bootstrap                ] Unable to lock JVM memory (ENOMEM). This can result in part of the JVM being swapped out. Increase RLIMIT_MEMLOCK (ulimit).

and curl http://127.0.0.1:9200/_nodes/process?pretty | grep mlockall gives:

        "mlockall" : false
        "mlockall" : false
        "mlockall" : false
        "mlockall" : false

https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration.html#setup-configuration-memory seems to contain some guidance as to what is going wrong

@dpb587
Copy link
Contributor

dpb587 commented Oct 5, 2015

I think the best first step would be adding ulimit -l unlimited to the control scripts, similar to how we raise the file limit.

It's not a good idea to disable swap unless you have a really, really good understanding of what's happening on the VM and I don't think that's something we should try to generalize in our release. That's more something to be handled by a colocated, generic utility release responsible for configuring sysctl, /proc/sys, and other low level settings.

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

No branches or pull requests

2 participants