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?
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With