Profile Image

What is Garbage collector tuning: -XX:ParallelGCThreads?

What is Garbage collector tuning: -XX:ParallelGCThreads? Have you used this JVM arguement before?What are the pros & cons of using this Java argument? Can you share your perspective/experience in using this JVM argument?

  • jvmargument

  • xx-parallelgcthreads

  • x-parallelgcthreads

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky



You can set a number of threads for GC to use:


-XX:ParallelGCThreads=xxx, where xxx represents the number of threads for a garbage collector to use.




JVM allows you to tune it’s behavior during garbage collection. We can control the number of garbage collector threads with the command-line option -XX:ParallelGCThreads. Because multiple garbage collector threads are participating in a minor collection, some fragmentation is possible due to promotions from the young generation to the tenured generation during the collection. Each garbage collection thread involved in a minor collection reserves a part of the tenured generation for promotions and the division of the available space into these "promotion buffers" can cause a fragmentation effect. Reducing the number of garbage collector threads and increasing the size of the tenured generation will reduce this fragmentation effect.


Default Value:


The default value varies with the platform on which the JVM is running.






Arguments related:


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


Related Posts:




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
  • jvmargument

  • xx-parallelgcthreads

  • x-parallelgcthreads