HotSpot在不同环境里的VM参数默认值参考

本文详细介绍了JVM在不同操作系统下的配置参数,包括Windows XP和Linux x64环境下的具体设置,并探讨了部分参数的含义及使用场景。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

暂时就放个gist链接出来:>> [url]https://gist.github.com/827140[/url] <<
多数参数的意义在这里可以查到:[url=http://hg.openjdk.java.net/jdk6/jdk6/hotspot/file/tip/src/share/vm/runtime/globals.hpp]globals.hpp[/url]

Windows测试环境:
OS: Windows XP Build 2600 Service Pack 3

CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 23 stepping 10, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1

Memory: 4k page, physical 3405352k(2067228k free), swap 5334424k(3848208k free)

vm_info: Java HotSpot(TM) Client VM (19.0-b09) for windows-x86 JRE (1.6.0_23-b05), built on Nov 12 2010 15:00:43 by "java_re" with MS VC++ 7.1 (VS2003)

OS: Windows XP Build 2600 Service Pack 3

CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 23 stepping 10, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1

Memory: 4k page, physical 3405352k(2043728k free), swap 5334424k(3801564k free)

vm_info: Java HotSpot(TM) Server VM (19.0-b09) for windows-x86 JRE (1.6.0_23-b05), built on Nov 12 2010 14:54:05 by "java_re" with MS VC++ 7.1 (VS2003)


Linux x64测试环境:
OS:Red Hat Enterprise Linux Server release 5.4 (Tikanga)

uname:Linux 2.6.18-164.el5xen #1 SMP Tue Aug 18 15:59:52 EDT 2009 x86_64
libc:glibc 2.5 NPTL 2.5
rlimit: STACK 10240k, CORE 0k, NPROC 28064, NOFILE 1024, AS infinity
load average:0.04 0.02 0.00

/proc/meminfo:
MemTotal: 3584000 kB
MemFree: 1742760 kB
Buffers: 342260 kB
Cached: 1122924 kB
SwapCached: 2076 kB
Active: 694568 kB
Inactive: 905416 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 3584000 kB
LowFree: 1742760 kB
SwapTotal: 1052248 kB
SwapFree: 1045628 kB
Dirty: 20 kB
Writeback: 0 kB
AnonPages: 133980 kB
Mapped: 17656 kB
Slab: 144916 kB
PageTables: 2540 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 2844248 kB
Committed_AS: 268736 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 700 kB
VmallocChunk: 34359737667 kB


CPU:total 4 (4 cores per cpu, 1 threads per core) family 6 model 15 stepping 11, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3

/proc/cpuinfo:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Xeon(R) CPU E5320 @ 1.86GHz
stepping : 11
cpu MHz : 1861.913
cache size : 4096 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu de tsc msr pae cx8 apic sep cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc pni cx16 lahf_lm
bogomips : 4656.41
clflush size : 64
cache_alignment : 64
address sizes : 38 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Xeon(R) CPU E5320 @ 1.86GHz
stepping : 11
cpu MHz : 1861.913
cache size : 4096 KB
physical id : 1
siblings : 1
core id : 0
cpu cores : 1
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu de tsc msr pae cx8 apic sep cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc pni cx16 lahf_lm
bogomips : 4656.41
clflush size : 64
cache_alignment : 64
address sizes : 38 bits physical, 48 bits virtual
power management:

processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Xeon(R) CPU E5320 @ 1.86GHz
stepping : 11
cpu MHz : 1861.913
cache size : 4096 KB
physical id : 2
siblings : 1
core id : 0
cpu cores : 1
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu de tsc msr pae cx8 apic sep cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc pni cx16 lahf_lm
bogomips : 4656.41
clflush size : 64
cache_alignment : 64
address sizes : 38 bits physical, 48 bits virtual
power management:

processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Xeon(R) CPU E5320 @ 1.86GHz
stepping : 11
cpu MHz : 1861.913
cache size : 4096 KB
physical id : 3
siblings : 1
core id : 0
cpu cores : 1
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu de tsc msr pae cx8 apic sep cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc pni cx16 lahf_lm
bogomips : 4656.41
clflush size : 64
cache_alignment : 64
address sizes : 38 bits physical, 48 bits virtual
power management:


Memory: 4k page, physical 3584000k(1742760k free), swap 1052248k(1045628k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (20.0-b08) for linux-amd64 JRE (1.6.0_25-ea-b01), built on Jan 27 2011 13:11:34 by "java_re" with gcc 3.2.2 (SuSE Linux)


====================================================================

一些参数的备注:

PrintClassHistogramBeforeFullGC (>= 6u18)
UseFPUForSpilling在支持SSE2或异常的系统上默认仍然是false的,但打开AggressiveOpts则会变为true
UseOprofile 留意一下这个参数,默认是false
MaxTenuringThreshold在使用CMS时的默认值会变成4

====================================================================

参数相关讨论:

[url=http://hllvm.group.iteye.com/group/topic/27945]JVM调优的"标准参数"的各种陷阱[/url]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值