Home

XXConcGCThreads

XXConcGCThreads refers to the -XX:ConcGCThreads VM option in the Oracle HotSpot Java Virtual Machine. It controls the number of concurrent garbage collector (GC) threads that participate in the GC’s concurrent phases. The flag is used by collectors that perform background work, notably the Concurrent Mark Sweep (CMS) collector and the Garbage-First (G1) collector, and is set with -XX:ConcGCThreads=<n>.

Setting a higher value can allow more GC work to progress in parallel with the running application,

Defaults and compatibility vary by GC algorithm and VM version. CMS has been deprecated in newer Java

Example: java -XX:ConcGCThreads=4 -jar myapp.jar

See also: -XX:ParallelGCThreads, -XX:+UseG1GC, -XX:+UseConcMarkSweepGC.

which
may
reduce
pause
times
on
multi-core
systems
and
improve
throughput
in
some
workloads.
However,
increasing
the
number
of
concurrent
GC
threads
can
also
raise
CPU
contention
between
the
application
and
the
GC,
potentially
reducing
overall
performance
if
the
value
is
too
high.
The
optimal
setting
depends
on
the
workload
characteristics
and
the
available
hardware.
releases
and
may
be
ignored
if
CMS
is
not
enabled.
For
G1,
-XX:ConcGCThreads
influences
the
number
of
concurrent
worker
threads
during
phases
such
as
marking
and
cleanup,
but
modern
JVM
tuning
often
relies
on
collector-specific
options
in
addition
to
or
instead
of
this
flag.
Users
should
consult
their
JDK
version’s
documentation
to
understand
current
behavior
and
defaults
for
their
environment.