java 虚拟机参数 -xms -xmx

7 篇文章 0 订阅

-Xms 初始化对内存大小

为了更好的性能把 -Xms  与-Xms 设为一样

如果不设置该值,那么默认根据你运行的模式来决定

-server mode: 系统25%的物理内存,最大不超过64m,最小8m

-client mode: 系统25%的物理内存,最大不超过16m,最小8m

如果设置了 -Xns 默认的xms 会被扩大到至少是-Xns的两倍



-Xmx 最大堆内存

如果不设置该值,那么默认的值根据平台和的系统的内存来决定,具体如下:

Release
Platform
Default Maximum Heap Size
R27.2 and older
Windows
75% of total physical memory up to 1 GB
R27.2 and older
Linux, Solaris
50% of available physical memory up to 1 GB
R27.3 and newer
Windows on a 64 bit platform
75% of total physical memory up to 2 GB
R27.3 and newer
Linux or Solaris on a 64 bit platform
50% of available physical memory up to 2 GB
R72.3 and newer
Windows on a 32 bit platform
75% of total physical memory up to 1 GB
R27.3 and newer
Linux on a 32 bit platform
50% of available physical memory up to 1 GB

注:-Xmx 必须大于或等于 -xms

    -Xmx 必须大于或等于 -xns

   -Xmx 最小为16mb



 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值