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

Add CPU and Memory limits to the docker-compose template #2

Open
OpenPj opened this issue Mar 24, 2022 · 0 comments
Open

Add CPU and Memory limits to the docker-compose template #2

OpenPj opened this issue Mar 24, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@OpenPj
Copy link
Owner

OpenPj commented Mar 24, 2022

It seems possible to add memory limitations for each container using Docker Compose V3.
The new element to add is deploy/resources and then we should add JVM memory limitations using percentages.
So we need to add them accordingly in order to consider something pretty close to a production environment.

The new element to add is deploy/resources such as the following:

deploy:
      resources:
        limits:
          cpus: '0.50'
          memory: 1024M

For any Java container we could also declare something like the following:
-XX:MinRAMPercentage=75 -XX:MaxRAMPercentage=75

@OpenPj OpenPj added the enhancement New feature or request label Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant