What is the difference between G1GC options -XX:ParallelGCThreads vs -XX:ConcGCThreads

RamiReddy P picture RamiReddy P · Jan 10, 2019 · Viewed 7.5k times · Source

when configuring the G1GC we have 2 kinds of thread count -XX:ParallelGCThreads and -XX:ConcGCThreads what is the difference, how they are going to impact, any reference is appreciated.

Answer

Dogukan Zengin picture Dogukan Zengin · Jan 10, 2019

G1 algorithm has phases which some of them are "stop the world" phases that stops the application during garbage collection, and it also has phases which happens concurrently while application is running(candidate marking etc..), with that information in mind:

ParallelGCThreads option affects the number of threads used for phases when application threads are stopped, and the ConcGCThreads flag affects the number of threads used for concurrent phases.