Profile Image
vishnupriya

What is CMS garbage collector: -XX:+USeParNewGC?

What is CMS garbage collector: -XX:+USeParNewGC? Have you used this JVM argument before? What are the pros & cons of using this Java argument? Can you share your perspective/experience in using this JVM argument?

  • jvm-argument

  • xx-useparnewgc

  • x-useparnewgc

  • CMS garbage collector

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky

Usage:

 

You can choose 1 of the 5 available garbage collectors, one of them is CMS GC:

 

-XX:+USeParNewGC

 

Description:

 

The Concurrent Mark Sweep (CMS) GC uses multiple threads for it’s regular garbage collection routine. It's designed for applications that prefer shorter garbage collection pauses, and can afford to share processor resources with the garbage collector while the application is running. It was designed for server-style apps running on multiprocessor servers with big amount of memory. Simply put, applications using this type of GC respond slower on average, but don't stop responding to perform garbage collection. Removed from java 14, not available in java 15.

 

Default Value:

 

Default is Parallel GC.

 

Errors:

 

None

 

Arguments related:

 

TODO link ParallelGCThreads, MaxGCPauseMillis , GCTimeRatio, MinHeapFreeRatio, MaxHeapFreeRatio, Xmx, Xms, UseSerialGC, UseParallelGC, UseG1GC, UseZGC

 

Related Posts:

NOTE:

 

If you have additional comments, interesting experiences or even point of disagreement with this JVM argument description, please leave a comment. Your insights will help the entire 10+ million java developer community to develop one standard source of documentation for all the JVM arguments.

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • jvm-argument

  • xx-useparnewgc

  • x-useparnewgc

  • CMS garbage collector