-Xms:初始堆大小或最小堆大小? [英] -Xms : Initial heap size or minimum heap size?

查看:484
本文介绍了-Xms:初始堆大小或最小堆大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

-Xms是指定初始堆大小还是最小堆大小?
我看到很多地方有很多不同的答案。有些人喜欢此处的第二个答案,表示它是用于初始堆和一些像这里说它的最小堆大小。
或者是最小大小本身是初始大小?

-Xms is to specify initial heap size or minimum heap size? I see lot of places with lot of different answers. Some like second answer here, say that it is for initial heap and some like here say that its minimum heap size. Or is it that the minimum size itself is the initial size?

推荐答案

初始堆大小是最小堆尺寸。它不会小于初始堆大小。

The initial heap size is the minimum heap size. It won't get smaller than the initial heap size.

使用5.0 Java [tm]虚拟机调整垃圾收集功能

From Tuning Garbage Collection with the 5.0 Java[tm] Virtual Machine:


默认情况下,虚拟机增长
或缩小每个集合
的堆以尝试将活动对象的空闲比例保留为每个
集合都在特定的范围内。
通过参数
-XX:MinHeapFreeRatio =和-XX:MaxHeapFreeRatio =将此目标范围设置为
百分比,总大小由
-Xms限制,以上由-Xmx。

By default, the virtual machine grows or shrinks the heap at each collection to try to keep the proportion of free space to live objects at each collection within a specific range. This target range is set as a percentage by the parameters -XX:MinHeapFreeRatio= and -XX:MaxHeapFreeRatio=, and the total size is bounded below by -Xms and above by -Xmx .

这篇关于-Xms:初始堆大小或最小堆大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆