并发标记扫描(CMS)是否阻止了世界事件? [英] Is Concurrent Mark Sweep (CMS) a stop the world event?
问题描述
[卸载课程太阳
[卸载类sun.reflect.GeneratedConstructorAccessor1896]
[卸载类sun.reflect.GeneratedSerializationConstructorAccessor485]
[卸载类sun.reflect.GeneratedSerializationConstructorAccessor579]
.. .. //大概1700美元
同时我没有看到烫发空间中的高峰,所以它似乎不是一个GC事件。
我想知道以下内容:
IS Concurrent Mark Sweep collection是一个停止世界事件吗?
即使烫发空间不满,它是否会发生?
CMS是一种GC,分为几个阶段
正如你可以看到两个p hases - 最初的标记和备注是停止世界事件。
来源:在审核代GC和CMS
部分。
即使烫发空间不够,它是否会发生?
AFAIK为此应该有 CMSClassUnloadingEnabled
与 UseConcMarkSweepGC
。当传送区域达到阈值时,FGC将被触发。
同时,如果并发扫描(短语(4))不是STW事件,如果permgen区域被填满(并且GC仍在处理permgen区域),可能导致停止所有进程线程和只有GC线程运行,直到回收所有需要的内存。
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
at the same time I do not see a spike in perm space, so it doesn't seems to be a GC event.
I wish to know the following
IS Concurrent Mark Sweep collection a stop the world event?
Does it happen even when the perm space is not full?
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.
Source : Under Reviewing Generational GC and CMS
section.
Does it happen even when the perm space is not full?
AFAIK for this you should have CMSClassUnloadingEnabled
with UseConcMarkSweepGC
. And FGC will be triggered when permgen area reaches it's threshold.
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.
这篇关于并发标记扫描(CMS)是否阻止了世界事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!