Depreciated garbage collection combinations

Oracle has been great about depreciating features, APIs, and libraries before removing them from a new release of the Java platform. With this schema in place, language components that were depreciated in Java 8 are subject for removal in Java 9. There are a few garbage collection combinations that were deemed to be rarely used and depreciated in Java 8. 

Those combinations, listed here, have been removed in Java 9:

  • DefNew + CMS 
  • ParNew + SerialOld 
  • Incremental CMS

These combinations, in addition to having been rarely used, introduced an unneeded level of complexity to the garbage collection system. This resulted in an extra drain on system resources without providing a commensurate benefit to the user or developer. 

The following listed garbage collection configurations were affected by the aforementioned depreciation in the Java 8 platform:

Garbage collection configuration Flag(s)
DefNew + CMS

-XX:+UseParNewGC
-XX:UseConcMarkSweepGC

ParNew + SerialOld -XX:+UseParNewGC
ParNew + iCMS -Xincgc
ParNew + iCMS

-XX:+CMSIncrementalMode
-XX:+UseConcMarkSweepGC

Defnew + iCMS

-XX:+CMSIncrementalMode
-XX:+UseConcMarkSweepGC
-XX:-UseParNewGC

 

With the release of Java 9, garbage collection combinations depreciated in JDK 8 were removed. Those combinations are listed along with the flags that control those combinations. In addition, the flags to enable CMS foreground collections were removed and are not present in JDK 9. Those flags are listed as follows:

Garbage collection combinations Flag
CMS foreground -XX:+UseCMSCompactAtFullCollection
CMS foreground -XX+CMSFullGCsBeforeCompaction
CMS foreground -XX+UseCMSCollectionPassing

 

The only assessed downside to the removal of the depreciated garbage collection combinations is that applications that use JVM startup files with any of the flags listed in this section, will need to have their JVM startup files modified to remove or replace the old flags.

..................Content has been hidden....................

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