Profile Image
vishnupriya

What is Parallel garbage collector: -XX:+UseParallelGC?

What is Parallel garbage collector: -XX:+UseParallelGC? 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-useparallelgc

  • x-useparallelgc

  • Parallel 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 ParallelGC:

 

-XX:+UseParallelGC

 

Description:

 

The default GC that is used by JVM. It is similar to Serial GC, but in contrast to it, it uses multiple threads for garbage collection and maintaining heap, but it still freezes other threads while performing GC. Parallel GC can use multiple CPUs to speed up the application throughput. So, it is also known as throughput collector. It is used if we want to execute a long process (like batch processing) and where long pauses are acceptable. If we use this GC, we can specify maximum garbage collection threads and pause time, throughput, and footprint (heap size) with -XX:ParallelGCThreads=<N>, -XX:MaxGCPauseMillis=<N>.

 

Default Value:

 

Default is Parallel GC.

 

Errors:

 

None

 

Arguments related:

 

TODO link ParallelGCThreads, MaxGCPauseMillis , GCTimeRatio, MinHeapFreeRatio, MaxHeapFreeRatio, Xmx, Xms, UseSerialGC, USeParNewGC, 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-useparallelgc

  • x-useparallelgc

  • Parallel garbage collector