Number of concurrent threads with ZGC
Sundara Mohan M
m.sundar85 at gmail.com
Tue Oct 1 19:39:18 UTC 2019
Thank you for the clarification.
Regards,
Sundar
On Tue, Oct 1, 2019 at 2:10 AM Per Liden <per.liden at oracle.com> wrote:
> Hi,
>
> The number of ZWorkers started is max(ParallelGCThreads, ConcGCThreads).
> This set of worker threads is then used for both stop-the-world
> operations and for concurrent operations. But if ConcGCThreads <
> ParallelGCThreads, then only a subset of the ZWorkers are used in
> concurrent GC operations.
>
> The number of ZRuntimeWorkers started is ParallelGCThreads. These
> threads are not really involved in GC work. Instead they help out doing
> various safepoint cleanup tasks (deflate monitors, cleans various data
> structures, etc).
>
> If you use -Xlog:gc+init (or -Xlog:gc*), then ZGC will at startup print
> number of threads configured for various tasks.
>
> cheers,
> Per
>
> On 9/30/19 8:12 PM, Sundara Mohan M wrote:
> > Hi,
> > When i configure my concurrent gc thread count as 5 using
> > -XX:ConcGCThreads=5.
> > I still see 40 threads (thread named ZWorkers, 40 is my cpu count) are
> > running in jvm.
> > Also i see 40 RuntimeWorkers thread running (assuming this is for
> > concurrent processing).
> >
> > Assuming "ZWorkers" thread for concurrent processing and "RuntimeWorkers"
> > for parallel processing or stw phase threads. Looks this assumption is
> not
> > correct.
> >
> > Can you help me understand why we create more than 5 "ZWorkers" if i
> > configure my concurrent thread count is 5.
> >
> > TIA
> > Sundar
> >
>
More information about the zgc-dev
mailing list