各种Sun JVM的默认最大堆大小是多少?

3

有人会认为查找列出不同JVM版本的默认最大堆大小的表格很容易......但是快速搜索没有找到这样的东西。

那么,各个Sun JVM的默认最大堆大小是多少?


我真的在寻找有关不同JVM版本中默认最大大小的参考资料。 - Jared
2个回答

2
我完全理解你的问题,因为JVM的默认设置因供应商和版本而异。我也对正确的矩阵感兴趣。但是我只有Oracle Java 7文档:
引用:

根据系统配置在运行时选择默认值。 对于服务器部署, -Xms 和 -Xmx 通常设置为相同的值。 有关更多信息,请参见HotSpot Ergonomics

深入文档中的内部隐藏文档它说:

The following changes take effect with J2SE 5.0. Garbage Collector of Server VM Changed to Parallel Garbage Collector

On server-class machines running the server VM, the garbage collector (GC) has changed from the previous serial collector (-XX:+UseSerialGC) to a parallel collector (-XX:+UseParallelGC). You can override this default by using the -XX:+UseSerialGC command-line option to the java command. Initial Heap Size and Maximum Heap Size Changed for Parallel Garbage Collector

On server-class machines running either VM (client or server) with the parallel garbage collector (-XX:+UseParallelGC) the initial heap size and maximum heap size have changed as follows.

Initial heap size: Larger of 1/64th of the machine's physical memory on the machine or some reasonable minimum. Before J2SE 5.0, the default initial heap size was a reasonable minimum, which varies by platform. 

Maximum heap size: Smaller of 1/4th of the physical memory or 1GB. Before J2SE 5.0, the default maximum heap size was 64MB. 

Note: The boundaries and fractions given for the heap size are correct for J2SE 5.0. They are likely to be different in subsequent releases as computers get more powerful.


1

Jared,根据Java 1.5文档,默认的最大大小为64MB。

看一下非标准选项-Xmsn和-Xmxn。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接