`
yinwufeng
  • 浏览: 276027 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

JVM 之CMS参数大全

    博客分类:
  • JVM
阅读更多

JVM命令行参数分为三种类型:标准选项(Java Virtual Machine Specification里定义的参数),非标准选项(以-X为前缀,不强制JVM实现),非稳定选项(以-XX为前缀,可能在某些版本被移除)

CMS相关

选项 类型 默认值 备注
-XX:+UseConcMarkSweepGC boolean false 老年代采用CMS收集器收集
-XX:+CMSScavengeBeforeRemark boolean false The CMSScavengeBeforeRemark forces scavenge invocation from the CMS-remark phase (from within the VM thread as the CMS-remark operation is executed in the foreground collector).
-XX:+UseCMSCompactAtFullCollection boolean false 对老年代进行压缩,可以消除碎片,但是可能会带来性能消耗
-XX:CMSFullGCsBeforeCompaction=n uintx 0 CMS进行n次full gc后进行一次压缩。如果n=0,每次full gc后都会进行碎片压缩。如果n=0,每次full gc后都会进行碎片压缩
–XX:+CMSIncrementalMode boolean false 并发收集递增进行,周期性把cpu资源让给正在运行的应用
–XX:+CMSIncrementalPacing boolean false 根据应用程序的行为自动调整每次执行的垃圾回收任务的数量
–XX:ParallelGCThreads=n uintx   并发回收线程数量:(ncpus <= 8) ? ncpus : 3 + ((ncpus * 5) / 8)
-XX:CMSIncrementalDutyCycleMin=n uintx 0 每次增量回收垃圾的占总垃圾回收任务的最小比例
-XX:CMSIncrementalDutyCycle=n uintx 10 每次增量回收垃圾的占总垃圾回收任务的比例
-XX:CMSInitiatingOccupancyFractio=n uintx jdk5 默认是68% jdk6默认92% 当老年代内存使用达到n%,开始回收。`CMSInitiatingOccupancyFraction = (100 - MinHeapFreeRatio) + (CMSTriggerRatio * MinHeapFreeRatio / 100)`
-XX:CMSMaxAbortablePrecleanTime=n intx 5000 在CMS的preclean阶段开始前,等待minor gc的最大时间。[see here](https://blogs.oracle.com/jonthecollector/entry/did_you_know)
-XX:+UseBiasedLocking boolean true Enables a technique for improving the performance of uncontended synchronization. An object is "biased" toward the thread which first acquires its monitor via a `monitorenter` bytecode or synchronized method invocation; subsequent monitor-related operations performed by that thread are relatively much faster on multiprocessor machines. Some applications with significant amounts of uncontended synchronization may attain significant speedups with this flag enabled; some applications with certain patterns of locking may see slowdowns, though attempts have been made to minimize the negative impact.
-XX:+TieredCompilation boolean false Tiered compilation, introduced in Java SE 7, brings client startup speeds to the server VM. Normally, a server VM uses the interpreter to collect profiling information about methods that is fed into the compiler. In the tiered scheme, in addition to the interpreter, the client compiler is used to generate compiled versions of methods that collect profiling information about themselves. Since the compiled code is substantially faster than the interpreter, the program executes with greater performance during the profiling phase. In many cases, a startup that is even faster than with the client VM can be achieved because the final code produced by the server compiler may be already available during the early stages of application initialization. The tiered scheme can also achieve better peak performance than a regular server VM because the faster profiling phase allows a longer period of profiling, which may yield better optimization.

分享到:
评论

相关推荐

    JVM入门实战/arthas实战/垃圾回收算法/垃圾回收器/jvm内存模型分析

    本系列课程从JVM基础到高级实战,老师手把手教你如何进行JVM...1.3JVM参数设置思路1.4JVM调优常用指令说明 第七节:JVM项目实战 1.1案例背景 1.2排查步骤 1.3.arthas 1.3.1.arthas简介 1.3.2.arthas实战 1.3总结

    JVM参数设置详细说明

    在这里我们曾经New Generation调大到1400m,总共2g的jvm heap,平均每次ygc花费时间60-70ms左右,CMS gc的init-mark和remark之和平均在50ms左右,这里我们意识到错误的方向,或者说CMS的作用,所以进行了修改。...

    JVM面试资料:JVM结构、JVM调优、四大垃圾回收算法、七大垃圾回收器

    JVM面试资料。 JVM结构:类加载器,执行引擎,本地方法接口,本地内存结构; 四大垃圾回收算法:复制算法、标记-清除算法、标记-整理算法、分代收集算法 ...JVM调优:命令行指令,设置堆内存大小的参数

    《JVM从入门到入魔》笔记.pdf

    3:JVM内存调优:JVM参数【标准参数、-X参数、-XX参数等】+常用命令【jps、jinfo、jstat、jstack、jmap】+常用工具【jconsole、jvisualvm、Arthas、MAT】+性能优化及总结+高并发场景分析+JVM性能优化指南。

    深入理解_Java_虚拟机 JVM_高级特性与最佳实践

    / 57 3.4.3 Parallel Scavenge收集器 / 59 3.4.4 Serial Old收集器 / 60 3.4.5 Parallel Old收集器 / 61 3.4.6 CMS收集器 / 61 3.4.7 G1收集器 / 64 3.4.8 垃圾收集器参数总结 / 64 3.5 内存分配与回收策略 /...

    JVM讲解视频.zip

    JVM启动参数设置 堆内存大小设置 方法区内存大小设置 栈分配内存大小设置 JVM对象创建原理 分配内存过程 o指针碰撞 o空闲列表 oCAS oTLAB 分配位置 o逃逸分析 o标量替换 对象头结构详解 对象垃圾...

    基于Java 8 和Java 11 的开源金融工程 finmath lib库,提供了与数学金融有关的方法的(JVM)实现

    使用各种年金映射的CMS复制。 利率期限结构模型的模拟(具有局部和随机波动性的LIBOR市场模型) 具有局部和随机波动性的LIBOR市场模型 时间均一的远期利率模型(LIBOR市场模型) LIBOR市场模型的校准 跨货币LIBOR...

    java面试题.docx

    常用的 JVM 调优的参数都有哪些? -Xms2g:初始化推大小为 2g; -Xmx2g:堆最大内存为 2g; -XX:NewRatio=4:设置年轻的和老年代的内存比例为 1:4; -XX:SurvivorRatio=8:设置新生代 Eden 和 Survivor 比例为 8:2;...

    java8集合源码分析-geektime-java-week-training-camp:极客时间-Java每周训练营

    启动参数详解; JDK 内置命令行工具、JDK 内置图形界面工具、JDWP 简介、JMX 与相关工具; 常见的 JVM GC 算法(Parallel GC/CMS GC/G1 GC)基本原理和特点; 新一代 GC 算法(Java11 ZGC/Java12 Shenandoah) 和 ...

    java面试常见基础(深层次,高级研发)

    3. JVM服务参数调优实战 14 3.1. 大型网站服务器案例 14 3.2. 内部集成构建服务器案例 15 4. 常量池在jvm的哪个空间里边? 17 5. jvm垃圾回收是什么时候触发的? 17 5.1. 那究竟GC为我们做了什么操作呢? 17 5.1.1. ...

    JCMS:Java颜色管理系统

    Java颜色管理系统(JCMS) 一个Java库,用于轻松管理ICC颜色转换。 它基本上是 C库的包装,带有一些帮助... 您可以使用系统属性JCMS_library_path (在启动JVM时添加参数-DJCMS_library_path = / path / to / libs)

    Eclipse开发分布式商城系统+完整视频代码及文档

    │ 19-tomcat中JVM参数优化.avi │ ├─补充2:Redis3.0新特性、主从复制、集群视频教程 │ │ 打开必读.txt │ │ │ ├─相关资料 │ │ redis-3.0.1.tar.gz │ │ redis-3.0.2.tar.gz │ │ redis-3.2.1.gem │...

    Java版水果管理系统源码-java-advanced:java-高级

    JVM 常规 画一张图展示 Xmx、Xms、Xmn、Meta、DirectMemory、Xss 这些内存参数的关系。 进阶 从Classloader到模块化,动态加载的插件机制。 使用自定义Classloader机制,实现xlass的加载。 实现xlass打包的xar(类似...

    verbosegcanalyzer:Java GC日志汇总报告

    仅适用于以下 JVM 参数-verbosegc -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:logs/gc.log和 CMS 收集器。 使用 JDK 6 测试。 #总结报告示例 Total time: 20.51 min Young size ...

    Java虚拟机

    对第1版中的错误和不足之处的修正;等等。 第2版不仅技术更新、内容更丰富,而且实战性更强。全书共分为五大部分,围绕内存管理、执行子系统、程序编译与优化、高效并发等核心主题对JVM进行了全面而深入的分析,...

Global site tag (gtag.js) - Google Analytics