部分JVM参数解释
2016-04-07 10:20
330 查看
从大神手里拿过来的JVM调优参数,仅仅是把每个参数的含义查询了一下,越是查询越是感觉得到,小用户量的产品优化无从谈起,用户量起来了一切就要从细节入手慢慢优化。知识还需要继续深化,自己知道的往往是浮在表面的东西。
堆=年轻代(new)+年老代(old)
年轻代 = Eden 和 Survivor*2
-Xmx2048m 最大堆大小
-Xms2048m 初始堆大小
-Xmn1024m 年轻代大小
-Xss1m 每个线程的堆栈大小
-XX:PermSize=256m 初始持久代大小
-XX:MaxPermSize=256m 最大持久代大小
-XX:+UseParNewGC 设置年轻代为并行收集
-XX:+UseConcMarkSweepGC 设置年老代为并发收集
-XX:+CMSParallelRemarkEnabled 降低标记停顿
-XX:SurvivorRatio=8 eden/survivor的比值
-XX:MaxTenuringThreshold=15 这个参数用于控制对象能经历多少次Minor GC才晋升到旧生代
-XX:CMSInitiatingOccupancyFraction=75 CMS堆上, 使用75%后开始CMS收集。
-XX:+UseCMSInitiatingOccupancyOnly 仅仅使用手动定义初始化定义开始CMS收集
-XX:+UseCompressedOops
Most HotSpot JVM in the last year have had it on by default. This option allows references to be 32-bit in a 64-bit JVM and access close to 32 GB of heap. (more than 32-bit pointers can) (You can have near unlimited off heap memory as well). This can save
a significant amount of memory and potentially improve performance.
If you want to use this option I suggest you update to a version which has it on by default as there may have been a good reason, such as bugs, why it wasn't enabled previously. Try Java 6 update 23 or Java 7 update 5.
In short, don't turn it on, use a version which has it on by default.
-XX:+PrintGCDetails 打印较为详细的GC信息
-XX:+PrintGCDateStamps 打印GC时间戳,相对于应用程序启动的时间
-XX:+PrintClassHistogram 打印类的直方图 ,用kill -3 pid 会打印
-Xloggc:log/gc.log 打印GC信息到指定文件 可以设置绝对路径的。
堆=年轻代(new)+年老代(old)
年轻代 = Eden 和 Survivor*2
-Xmx2048m 最大堆大小
-Xms2048m 初始堆大小
-Xmn1024m 年轻代大小
-Xss1m 每个线程的堆栈大小
-XX:PermSize=256m 初始持久代大小
-XX:MaxPermSize=256m 最大持久代大小
-XX:+UseParNewGC 设置年轻代为并行收集
-XX:+UseConcMarkSweepGC 设置年老代为并发收集
-XX:+CMSParallelRemarkEnabled 降低标记停顿
-XX:SurvivorRatio=8 eden/survivor的比值
-XX:MaxTenuringThreshold=15 这个参数用于控制对象能经历多少次Minor GC才晋升到旧生代
-XX:CMSInitiatingOccupancyFraction=75 CMS堆上, 使用75%后开始CMS收集。
-XX:+UseCMSInitiatingOccupancyOnly 仅仅使用手动定义初始化定义开始CMS收集
-XX:+UseCompressedOops
Most HotSpot JVM in the last year have had it on by default. This option allows references to be 32-bit in a 64-bit JVM and access close to 32 GB of heap. (more than 32-bit pointers can) (You can have near unlimited off heap memory as well). This can save
a significant amount of memory and potentially improve performance.
If you want to use this option I suggest you update to a version which has it on by default as there may have been a good reason, such as bugs, why it wasn't enabled previously. Try Java 6 update 23 or Java 7 update 5.
In short, don't turn it on, use a version which has it on by default.
-XX:+PrintGCDetails 打印较为详细的GC信息
-XX:+PrintGCDateStamps 打印GC时间戳,相对于应用程序启动的时间
-XX:+PrintClassHistogram 打印类的直方图 ,用kill -3 pid 会打印
-Xloggc:log/gc.log 打印GC信息到指定文件 可以设置绝对路径的。
相关文章推荐
- swoCdnaslluB.299
- &#x开头的是什么编码呢。浏览器可以解释它。如中国等同与中文"中国"?
- 写在开始
- 第四章 master模块解析
- 教你玩转产品管理系统iClap(基础功能篇)
- hadoop2.2 伪分布式环境
- 常用的简单排序之插入排序,冒泡排序,选择排序,希尔排序
- Word2013 插入代码块方法
- 2016年4月7日
- WAV文件格式分析(转载)
- 通用标签
- 真机调试报 App installation failed
- PLUGINS that HELP YOU WORKING WITH ECLIPSE
- yacc 学习
- 传值
- js 对象属性复制到另一个对象
- 重构13天 抽取方法对象(Extract Method Object)
- PHP使用Mysqli类库实现完美分页效果的方法
- 搜索算法-二分搜索-方程解问题(problem 1001)
- UVA 1006 水题