Limiting java application's memory and cpu usage

后端 未结 8 674
南笙
南笙 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

    https://github.com/haosdent/jcgroup jcgroup is your best choice. You could use this library to limit the CPU shares, Disk I/O speed, Network bandwidth and etc.

提交回复
热议问题