markshust / docker-magento

Mark Shust's Docker Configuration for Magento
https://m.academy/courses/set-up-magento-2-development-environment-docker/
MIT License
2.58k stars 1.01k forks source link

Elasticsearch container using a lot of memory #1162

Closed abdel-aouby closed 5 months ago

abdel-aouby commented 5 months ago

Description I'm on UBUNTU 24.04 with the docker engine and not the docker desktop

Elasticsearch container uses a lot of memory. This may be a wrong configuration of docker on my part. please I will need help with that if possible. My machine has 32 G of memory, and the Elasticsearch is using about half of it (this does not happen to me with other projects on the same machine)

Steps To Reproduce

  1. bin/start
  2. check the running processes

Expected Result Elasticsearch container does not consume too much memory when runing

Actual Result Elasticsearch container using a lot of memory (more than 50%)

Screenshot from 2024-05-27 10-51-08

Screenshot from 2024-05-27 10-51-38

Screenshot from 2024-05-27 10-52-11

YevhenZvieriev commented 5 months ago

Hi @abdel-aouby

You can set the minimum and maximum heap size to an appropriate value in your compose.yaml file. For example, to limit Elasticsearch to 8GB of memory:

- "ES_JAVA_OPTS=-Xms8g -Xmx8g"

Screenshot from 2024-05-27 18-11-15

abdel-aouby commented 5 months ago

Hi @YevhenZvieriev it works fine I had an old version of the project that did not contain this value, thank you for your help I'm closing the issue.