DEV Community

loading...

Discussion on: Why do Java containers (docker) take so much memory?

Collapse
theodesp profile image
Theofanis Despoudis

Yeap that's Java heap space. you can control it via JVM args. See: link

Collapse
jouo profile image
Jashua Author

Oh that's interesting!

But how do people know how much memory should an application need?

for example that simple web app that only returns "Hello World", how do I know how much memory is enough?

Collapse
theodesp profile image
Theofanis Despoudis

I think you might need to check minimum hardware requirements depending on the JVM version. For example here is for Java 7 or 8

java.com/en/download/help/sysreq.xml

You can also consult on this guide:

docs.oracle.com/cd/E15523_01/web.1...

Because the app is a hello world, then I would assume that you will need the minimum (say a safe 8mb)