Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UseConcMarkSweepGC is deprecated, what is its replacement?

A java program is giving this warning, with JRE 10.0.2:

Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

What is the recommended replacement for this switch?

like image 715
Alex Shroyer Avatar asked Sep 08 '18 21:09

Alex Shroyer


People also ask

Why CMS GC is deprecated?

The popular Concurrent Mark Sweep (CMS) GC algorithm is deprecated in JDK 9. According to JEP-291, this decision has been made to reduce the maintenance burden of the GC code base and accelerate new development.

What is UseConcMarkSweepGC?

The Concurrent Mark-Sweep (CMS) Collector, -XX:+UseConcMarkSweepGC, actually uses the Parallel New (ParNew) Collector of the Young generation and the Concurrent Mark Sweep (CMS) Collector of the Tenured generation. The CMS Collector uses "ParNew" to represent Young Generation GC in log messages.


1 Answers

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.

From the Official JEP

like image 189
Eugene Avatar answered Oct 07 '22 17:10

Eugene