Limiting java application's memory and cpu usage

后端 未结 8 684
南笙
南笙 2020-12-18 21:45

Say, \"run myApp.jar with cpu=800 and memory=1024\"

Ive been doing java programming for many years and it is an embarrasment to ask this question. I don\'t even know

8条回答
  •  猫巷女王i
    2020-12-18 22:32

    Please, be careful with memory and CPU options when running jvm 8 or earlier. There are a couple of very nice articles about that. Check it out:

    https://developers.redhat.com/blog/2017/03/14/java-inside-docker/

    https://jaxenter.com/nobody-puts-java-container-139373.html

    Having said that, containerization - is the right way to go for microservice architecture regardless of the stack, and jvm is not as exception to that. It is however, important to be aware of the caveats.

提交回复
热议问题