Concurrent Mark Sweep (CMS)

The goal of the CMS is to reduce GC pauses, enabling you to execute the GC while the application is running. For this, it uses multiple threads. The main idea is to be able to free some memory before the tenured generation is full, and the GC needs to pause the application threads. If it happens too frequently, you will need to adjust the application tuning (CMS configuration) to avoid it as much as possible and to keep it behaving correctly. You can identify this type of issue checking verbose:gc output and Concurrent Mode Failure messages.

Compared to the standard Mark phase, the one of the CMS algorithm will pause the application twice: first pause to mark objects directly reachable from the root of the memory ...

Get Java EE 8 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.