0

I have some issues understanding how a Docker Java container uses memory for the host machine. I gave the container JVM opt

"JAVA_OPTS=-XX:MaxMetaspaceSize=1024m -Xms=512m -Xmx=1024m -XX:PermSize=512m -XX:MaxPermSize=1024m "

But when I'm running Docker stats on the container I see that MEM USAGE is 1.6GB

Is docker allocating memory for the none of JVM parts of the container?

Do you usually limit the container memory limit?

1 Answer 1

1

That's all the memory of the docker container (OS + JVM) including the operating system. And yes you can put some limit to the memory check:

https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.