Chinaunix首页 | 论坛 | 博客
  • 博客访问: 333436
  • 博文数量: 64
  • 博客积分: 2301
  • 博客等级: 大尉
  • 技术积分: 570
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-25 11:48
文章分类

全部博文(64)

文章存档

2013年(5)

2012年(6)

2011年(36)

2010年(7)

2009年(10)

分类: WINDOWS

2012-05-30 11:45:49

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单个线程堆的大小。
阅读(7632) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~