Saturday, 15 May 2010

Docker - can you over-allocate ram (tomcat)? -



Docker - can you over-allocate ram (tomcat)? -

question newbie point-of-view: can docker 'overallocated' ram wise, , idea?

the usecase multiple tomcats on single server, tomcat has minimum (xms) handles 80% of load needs, maximum (xmx) handle load.

10 tomcats, average xms @ 256mb, , xmx @ 896, want allocate docker's ram @ total 896+permgen(64m)+os needs (64mb) = 1024mb, though won't used time?

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

if host supports swap memory, -m memory setting can larger physical ram

thanks feedback if people experience can confirm (and/or have done this!) appreciated!

-d

docker can overcommit memory, mentionned in documentation. problems may face when doing no different ones have if running processes on host instead of container. long resident memory footprint (res / rss) smaller actual ram on host, should fine. virtual memory footprint can larger not need allocated ( virt / vsz ).

i tend not configure swap @ because when starts used, machine becomes slow (if using spinners) unlikely recover. contrario, without swap, memory allocation fail , process die scheme not need rebooted fixed.

tomcat docker

No comments:

Post a Comment