Concurrent Mark Sweep (CMS) 是一项停止世界活动吗?

Is Concurrent Mark Sweep (CMS) a stop the world event?(Concurrent Mark Sweep (CMS) 是一项停止世界活动吗?)
本文介绍了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 为此你应该有 CMSClassUnloadingEnabledUseConcMarkSweepGC.当永久区域达到其阈值时,将触发 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) 是一项停止世界活动吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How can create a producer using Spring Cloud Kafka Stream 3.1(如何使用Spring Cloud Kafka Stream 3.1创建制片人)
Insert a position in a linked list Java(在链接列表中插入位置Java)
Did I write this constructor properly?(我是否正确地编写了这个构造函数?)
Head value set to null but tail value still gets displayed(Head值设置为空,但仍显示Tail值)
printing nodes from a singly-linked list(打印单链接列表中的节点)
Control namespace prefixes in web services?(控制Web服务中的命名空间前缀?)