JDK-8142518 : JEP 291: Deprecate the Concurrent Mark Sweep (CMS) Garbage Collector
  • Type: JEP
  • Component: hotspot
  • Sub-Component: gc
  • Priority: P3
  • Status: Closed
  • Resolution: Delivered
  • Fix Versions: 9
  • Submitted: 2015-11-11
  • Updated: 2020-04-06
  • Resolved: 2017-06-15
Related Reports
Relates :  
Relates :  
Relates :  
Description
Summary
-------

Deprecate the Concurrent Mark Sweep (CMS) garbage collector, with the
intent to stop supporting it in a future major release.

Goals
-----

Accelerate the development of other garbage collectors in HotSpot.

Motivation
----------

Dropping support for CMS and then removing the CMS code, or at least more
thoroughly segregating it, will reduce the maintenance burden of the GC
code base and accelerate new development.  The G1 garbage collector is
intended, in the long term, to be a replacement for most uses of CMS.

Description
-----------

Deprecate CMS so that a warning message is issued when it is requested
on the command line, via the `-XX:+UseConcMarkSweepGC` option.

This JEP does not specify the major release in which support for CMS
will be dropped.  The decision of when to do that will be informed by
the extent to which the G1 collector proves to be a suitable replacement
for CMS.  In the meantime, CMS users are encouraged to migrate to the G1
collector (`-XX:+UseG1GC`).


Testing
-------

Verify that the intended deprecation message is emitted when the CMS
collector is requested.


Risk and Assumptions
--------------------

 - For some applications CMS is a very good fit and might always
   outperform G1.

 - When support of CMS is ended, CMS will not be available in new
   releases.

Comments
This might be related and helpful: https://bugs.openjdk.java.net/browse/JDK-8163329
15-11-2016

Interested parties had another meeting at JavaOne on 9/20. The meeting notes are attached.
21-10-2016

These are the meeting notes for a meeting on the topic of this JEP with various OpenJDK members.
01-08-2016

Request FC extension Justification: Did not complete JEP process before FC. Risk Assessment: Low. Code change for CMS deprecation extremely minor. Proposed Integration Date: Aug 2016 Proposed Due Date: Aug 2016
07-07-2016

Some mail discussions on openjdk mailing list http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2016-June/018353.html http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2016-July/018532.html
01-07-2016

There seem to be other ways to request CMS besides -XX:+UseConcMarkSweepGC. -Xconcgc (there is also -Xnoconcgc) -XX:+UseAutoGCSelectPolicy (product option, default is false) and MaxGCPauseMillis is not default and is <= AutoGCSelectPauseMillis (product option defaulting to 5sec)
17-05-2016

The code changes are based on an established framework for deprecating command line flags so entails the addition of 1 line of code. There is also an established test for deprecated command line flags which requires the addition of 1 line of code.
09-05-2016