开发者

What are the default maximum heap sizes for the various Sun JVM's?

One would think it would be ea开发者_如何学Csy to find a table that lists the default maximum heap sizes for the different JVM versions...but a quick search didn't find such a thing.

So, what are the default maximum heap sizes for the various Sun JVM's?


I totally see the point in your question, since the JVM defaults differ by vendor and version. I would also be interested in a proper matrix. But all i have is Oracle Java 7 docs says:

The default value is chosen at runtime based on system configuration. For server deployments, -Xms and -Xmx are often set to the same value. For more information, see HotSpot Ergonomics

and deeper inside the docs it says:

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.


Jared, according to Java 1.5 documentation, the default max size is 64MB.

Take a look at -Xmsn and -Xmxn non-standard options.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜