Docker - can you reallocate RAM (tomcat)?

Question from a newbie point-of-view: can a Docker be “combined” with a reasonable Ram, and is that a good idea?

Usecase is multiple tomcats on a single server, where tomcat has a minimum (XMS) that handles 80% of the load needs, but then a maximum (XMX) to handle the extra load.

10 tomcats with an average XMS of 256 MB and XMX in step 896, would you like to distribute dockers with a total need of 896 + permgen (64 m) + os (64 MB) = 1024 MB, although this will not be used all the time?

https://docs.docker.com/reference/run/#runtime-constraints-on-cpu-and-memory

If the host supports swap memory, the -m memory option may be larger than physical RAM

Thanks for any feedback if people with experience can confirm (and / or have already done it!) Will be appreciated!

-D

+4
source share
1 answer

Docker can recompile memory as indicated in the documentation. The problems that you may encounter while doing this are no different from those that you encounter when starting processes on the host instead of the container. As long as memory resident memory (RES / RSS) is smaller than the actual RAM on the host, you should be fine. The amount of virtual memory can be significantly larger, but in fact it does not need to be allocated (VIRT / VSZ).

, , ( ), . , , , .

+2

Source: https://habr.com/ru/post/1545762/


All Articles