Profile Image
vishnupriya

What is CMS garbage collector tuning: -XX:ConcGCThreads?

What is CMS garbage collector tuning: -XX:ConcGCThreads? 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-concgcthreads

  • x-concgcthreads

  • CMS garbage collector tuning

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky

Usage:

 

You can set the number of threads used for concurrent GC:

 

-XX:ConcGCThreads=xxx,  where xxx is desired number of threads.

 

Examples:

 

To set the number of threads for concurrent GC to 4 use:

 

-XX:ConcGCThreads=4

 

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. We can tune CMS GC with additional options, one of them is ConcGCThreads. It sets the number of threads used for concurrent GC. Sets threads to approximately 1/4 of the number of parallel garbage collection threads. The default value depends on the number of CPUs available to the JVM.

 

Default Value:

 

Default value platform-dependent .

 

Errors:

 

None

 

Arguments related:

 

TODO link USeParNewGC, MaxHeapSize, MinHeapFreeRatio, MaxHeapFreeRatio, Xmx, Xms

 

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-concgcthreads

  • x-concgcthreads

  • CMS garbage collector tuning