Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

ELK consumes too much resources on the docker version #252

Closed
silverdaz opened this issue Feb 5, 2018 · 6 comments
Closed

ELK consumes too much resources on the docker version #252

silverdaz opened this issue Feb 5, 2018 · 6 comments
Assignees
Labels

Comments

@silverdaz
Copy link
Contributor

....crashes after a while.

Screenshot 2018-01-23 10.59.37.png

@silverdaz silverdaz added the bug label Feb 5, 2018
@silverdaz
Copy link
Contributor Author

Here is a possible explanation of the issue, but Dmytro pointed out in the page that:


Elasticsearch alone needs at least 2GB of RAM to run.

With Docker for Mac, the amount of RAM dedicated to Docker can be set using the UI: see How to increase docker-machine memory Mac (Stack Overflow).```

That's not a good sign...

@silverdaz
Copy link
Contributor Author

Link from Stefan: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-cli-run-prod-mode

@blankdots
Copy link

A brief look into this, as I managed to run it by using the link above for docker-cli-run (discovered that by looking into docker logs for elastic).
The key differences are the amount of memory and the OS (using RHEL 7), the amount of memory showed as limit is 7.5GB, and also there seems to be a spike at first, as elk goes up and after a minute or so it is down to ~11%:
screenshot from 2018-02-05 14-18-20

An idea is that there are some prerequisites as pointed here: https://elk-docker.readthedocs.io/#prerequisites As elastic alone requires 2GB RAM - and it is safe to think that 2 elastic instances = 4GB minimum

Also tried running a vanilla docker-elk: https://github.com/deviantony/docker-elk and revealed a similar pattern there is a spike (200-300+%) after that it drops down (to 10-20%) - as illustrated by gif:
peek 2018-02-06 08-16

Increasing memory should help (MacOS needs to be confirmed), and @dtitov pointed https://docs.travis-ci.com/user/reference/overview/ in order to try how this on travis.

There is a https://www.elastic.co/guide/en/logstash/current/performance-troubleshooting.html guide, not sure it is the scope of this issue.

@blankdots
Copy link

Follow up: by looking over the logs of docker-compose up noticed that elasticsearch failed to start with message:

ega-elasticsearch-swe1 | [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
ega-elasticsearch-fin1 | [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

This confirms #252 (comment)
Thus on linux setting: sudo sysctl -w vm.max_map_count=262144 should do the trick (even on travis, adding it in the before_install), and on macOS same solution as pointed in #252 (comment)

Should we to look more into this?

@dtitov
Copy link

dtitov commented Feb 13, 2018

Just fix it, if you know how to 😺

@silverdaz
Copy link
Contributor Author

Solved by PR#254

@silverdaz silverdaz added bug and removed bug labels Feb 16, 2018
viklund pushed a commit that referenced this issue Nov 22, 2018
forgot travis


forgot network create
viklund pushed a commit that referenced this issue Nov 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants