如何设置JVM的最大内存使用量? [英] How to set the maximum memory usage for JVM?
本文介绍了如何设置JVM的最大内存使用量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想限制JVM使用的最大内存.注意,这不仅仅是堆,我想限制这个进程使用的总内存.
I want to limit the maximum memory used by the JVM. Note, this is not just the heap, I want to limit the total memory used by this process.
推荐答案
使用参数 -Xms
-Xmx
.在数字后使用 M
或 G
分别表示字节的 Megs 和 Gigs.-Xms
表示最小值,-Xmx
表示最大值.
use the arguments -Xms<memory>
-Xmx<memory>
. Use M
or G
after the numbers for indicating Megs and Gigs of bytes respectively. -Xms
indicates the minimum and -Xmx
the maximum.
这篇关于如何设置JVM的最大内存使用量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文