Limiting java application's memory and cpu usage

后端 未结 8 646
南笙
南笙 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条回答
  •  醉梦人生
    2020-12-18 22:29

    you can limit memory usage by -Xmx option and you can limit CPU usage by setting priority of the process and/or CPU affinity.

提交回复
热议问题