xms java_java xms xmx xmn xss解释

java xms xmx xmn xss解释

Xmx是java的一个选项,用来设置你的应用程序能够使用的最大内存数(是应用程序,不是整个jvm),如果你的程序要花很大内存的话,那就需要修改缺省的设置,比如配置tomcat的时候,

如果流量啊程序啊都很大的话就需要加大这个值了,不过有一点是要记住的,不要大得超过你的机器的内存,那样你的机器会受不了的,到时候就死翘翘了。 Xms是另一个设置内存的参数,用它来设置程

序初始化的时候内存栈的大小,增加这个值的话你的程序的启动性能会得到提高。不过同样有前面的限制,以及受到xmx的限制。

-Xms 最小堆的大小, 也就是当你的虚拟机启动后, 就会分配这么大的堆内存给你 -Xmx 是最大堆的大小

-Xmsn Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 2MB. Examples:

-Xms6291456

-Xms6144k

-Xms6m

-Xmxn Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. The upper limit for this value will be approximately 4000m on Solaris 7 and Solaris 8 SPARC platforms and 2000m on Solaris 2.6 and x86 platforms, minus overhead amounts. Examples:

-Xmx83886080

-Xmx81920k

-Xmx80m

在solaris7和8 -Xmxn这个参数的上线值达到4000M,在solaris2.6和x86平台能达到2000M。

-Xmn5000m   //年轻代大小   -Xss256k单个线程堆的大小。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值