Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
254 views
Welcome To Ask or Share your Answers For Others

1 Answer

CMS is a type of GC and is divided into phases

enter image description here

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...