Is Concurrent Mark Sweep (CMS) a stop the world event?(Concurrent Mark Sweep (CMS) 是一项停止世界活动吗?)
问题描述
我看到许多类卸载,我的整个系统在那段时间里都会挂起..
I see many unloading of classes and my entire system will hang during that period of time..
[Unloading class sun.reflect.GeneratedMethodAccessor117]
[Unloading class sun.reflect.GeneratedConstructorAccessor1896]
[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor485]
[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor579]
.... // about 1700 of them
同时我没有看到烫发空间出现峰值,所以这似乎不是 GC 事件.
at the same time I do not see a spike in perm space, so it doesn't seems to be a GC event.
我想知道以下内容
Concurrent Mark Sweep 收集是停止世界事件吗?
IS Concurrent Mark Sweep collection a stop the world event?
烫发空间未满时也会出现这种情况吗?
Does it happen even when the perm space is not full?
推荐答案
CMS是GC的一种,分阶段
CMS is a type of GC and is divided into phases
你可以看到两个阶段 - 初始标记和备注是停止世界事件.
As you can see two phases - Initial mark and Remark are stop the world events.
来源:在 查看世代 GC 和 CMS 部分.
Does it happen even when the perm space is not full?
AFAIK 为此你应该有 CMSClassUnloadingEnabled 和 UseConcMarkSweepGC.当永久区域达到其阈值时,将触发 FGC.
AFAIK for this you should have CMSClassUnloadingEnabled with UseConcMarkSweepGC. And FGC will be triggered when permgen area reaches it's threshold.
虽然并发扫描(短语(4))不是 STW 事件,如果 permgen 区域被填满(并且 GC 仍在处理 permgen 区域),它可能会导致停止所有进程线程并且只有 GC 线程运行直到所有需要的内存被回收.
Also though Concurrent Sweep(phrase (4)) is not STW event if permgen area get filled up(and GC is still processing permgen area) it may led to stopping all process threads and only GC thread running till all required memory is reclaimed.
这篇关于Concurrent Mark Sweep (CMS) 是一项停止世界活动吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Concurrent Mark Sweep (CMS) 是一项停止世界活动吗?
基础教程推荐
- 从 python 访问 JVM 2022-01-01
- 如何在 JFrame 中覆盖 windowsClosing 事件 2022-01-01
- 大摇大摆的枚举 2022-01-01
- 不推荐使用 Api 注释的描述 2022-01-01
- Java Swing计时器未清除 2022-01-01
- 在 Java 中创建日期的正确方法是什么? 2022-01-01
- 验证是否调用了所有 getter 方法 2022-01-01
- Java 实例变量在两个语句中声明和初始化 2022-01-01
- 如何在 Spring @Value 注解中正确指定默认值? 2022-01-01
- 多个组件的复杂布局 2022-01-01
