Skip to content

Disable memory swapping #116

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

Closed
Doweig opened this issue Aug 18, 2016 · 7 comments
Closed

Disable memory swapping #116

Doweig opened this issue Aug 18, 2016 · 7 comments

Comments

@Doweig
Copy link

Doweig commented Aug 18, 2016

Hello guys,

I am currently trying to optimize Elasticsearch in production.
I have noticed that is it recommended to disable memory swapping in production and the official documentation is giving 3 ways to accomplish that:

https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html#_swapping_is_the_death_of_performance

1- sudo swapoff -a + edit /etc/fstab
2- Change the sysctl value, vm.swappiness = 1
3- Change java options by editing elasticsearch.yml, bootstrap.mlockall: true

Inside the docker image however, none of there 3 ways have been implemented

Is it something that should be handled on docker level or on the host level ?

Thank you in advance guys!

@Doweig Doweig changed the title Elasticsearch - disable swapping Disable memory swapping Aug 18, 2016
@patrickleet
Copy link

patrickleet commented Mar 27, 2017

I also can't get this to work in a Docker container. Seems like the instructions are for everything except Alpine linux, which is what the official image is on.

@Doweig ever find any solutions for this?

@Doweig
Copy link
Author

Doweig commented Mar 28, 2017

Nope

@gjobin
Copy link

gjobin commented Aug 1, 2017

Stuck on the same issue. Anybody ?

@elianka
Copy link

elianka commented Aug 8, 2017

+1

@tianon
Copy link
Member

tianon commented Aug 8, 2017

Only the third of the suggested fixes is possible within a container -- the first two need to be completed on the container host instead.

As for changing the default options, we try to stick as close as possible to what upstream provides.

@mario-mui
Copy link

someone find any solutions for this?

@tianon
Copy link
Member

tianon commented Oct 4, 2017

This image is officially deprecated in favor of upstream's images (see https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html).

For more information, please see #160, docker-library/docs#842, and docker-library/docs#945.

This image has been deprecated in favor of the official elasticsearch image provided and maintained by elastic.co. The upstream images are available to pull via docker.elastic.co/elasticsearch/elasticsearch:[version] like 5.4.2. The images found here will receive no further updates once the 5.6.0 release is available upstream. Please adjust your usage accordingly.

Elastic provides open-source support for Elasticsearch via the elastic/elasticsearch GitHub repository and the Docker image via the elastic/elasticsearch-docker GitHub repository, as well as community support via its forums.

Thanks!

@tianon tianon closed this as completed Oct 4, 2017
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

6 participants