非服务器类计算机上Xmx,Xms,MaxPermSize的默认值 [英] Default values for Xmx, Xms, MaxPermSize on non-server-class machines
问题描述
非服务器类计算机上的Java 6中以下选项的默认值是什么?
- -Xmx
- -XX:MaxPermSize
Oracle的文档指出: :
Oracle's documentation states that:
在运行服务器VM的服务器级计算机上,垃圾收集器(GC)已从以前的串行收集器(-XX:+ UseSerialGC)更改为并行收集器(-XX:+ UseParallelGC).
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).
和
在运行带有并行垃圾收集器(-XX:+ UseParallelGC)的VM(客户端或服务器)的服务器级计算机上,初始堆大小和最大堆大小已更改
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
该页面未描述非服务器类计算机的默认值,仅描述了初始值,例如,初始堆大小为合理的最小值".查看手册页" java
命令针对-Xms
有以下内容:
The page doesn't describe the defaults for non-server-class machines, only that, for example, the initial heap size is "a reasonable minimum". Looking at the 'man page' for the java
command there is the following against -Xms
:
在运行时根据系统配置选择默认值
The default value is chosen at runtime based on system configuration
推荐答案
Windows 7/32位上JDK 1.6.0_29的默认值:
Default values for JDK 1.6.0_29 on Windows 7/32-bit:
-Xmx256m
-XX:MaxPermSize=64m
这些选项的值也可以通过以下命令打印:
Also value of these option can be printed by following command:
java -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version 2>&1
然后查找MaxHeapSize和MaxPermSize键并查看默认值.
Then look for MaxHeapSize and MaxPermSize keys and see default values.
uintx InitialHeapSize := 199947456 {product}
uintx MaxHeapSize := 268435456 {product}
uintx MaxPermSize = 67108864 {pd product}
此处是终极Hotspot VM选项备忘单,其中包含JDK的最后5个版本的默认设置和说明(7、8、9、10和11).
Here is the Ultimate HotSpot VM Options Cheat Sheet with defaults and descriptions for last 5 versions of JDK (7, 8, 9, 10 & 11).
这篇关于非服务器类计算机上Xmx,Xms,MaxPermSize的默认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!