Concurrent collectors

Concurrent collectors don't pause an application when they run. Instead, they reclaim the memory while the application is running.

There are two variants of concurrent collectors—concurrent mark-sweep (CMS) and G1 GC (Garbage First). G1 GC now replaces the CMS, and G1 GC cleans the old generation concurrently when the application is running. There are still some pauses while G1 GC runs to ensure consistency, but these are much shorter than the full GC that runs with a parallel collector.

The pauses in the concurrent collectors include the mark and remark phases. When GC starts, there is a pause for the initial marking of the objects and then again for the unused objects that are claimed from memory while the application is running. After this, there will be a small pause again at the end for remarking and cleanup.

Younger generation collectors are parallel by default and there is no way to make them concurrent.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset