The garbage collector for generating Java has several different “types” of garbage collection. As you already mentioned, “small zigzags” are small collections in a young space, and a black bar is a complete collection of garbage. For the sake of simplicity, I will simply describe the most important parts of what is happening.
The younger generation is divided into the Eden space by one or more “surviving” spaces. During one of these small zigzags, dead objects in Eden's space are removed, and living objects are moved to one of the survivors. This is a very fast operation, because the weak generation hypothesis states that most objects will be short-lived. A subsequent scan of the surviving space can move objects that are still alive from the space of the survivors into a generation of generations. It is still considered a small collection.
I suspect that what you see in the first big fall is actually a “progression” from surviving generations to generation after generation.
A supported generation is all that is not young enough to be in the young generation (which means, like many other GC options, it’s configurable). The labor generation is much larger than the younger generation, and therefore takes a long time to sweep. When you talk about “complete” garbage collection, this refers to the scope of the generation (in addition to the younger generation).
The CMS garbage collector works at the same time for most of the things that it does, but still has to stop the world for labeling operations on the young and the generation of generations. The CMS builder is supposed to be very fast, even for large heaps. However, there is another situation where the CMS stops the world: parallel mode failure .
The second big drop with a pause may have been the result of this, which occurs when a generation of generations is too full. You can adjust the size of the generator and other parameters to avoid this.
source share