7.19.4 -XX:ConcGCThreads
-XX:ConcGCThreads specifies the number of threads that can execute processing for concurrent marking in parallel.
Description
-XX:ConcGCThreads specifies the number of threads that can execute processing for Concurrent Marking in parallel when G1GC is enabled.
When Java VM starts, the number of Concurrent Marking processing threads specified in this option is created, and then the processing is executed. When this option is omitted, the number of Concurrent Marking processing threads calculated by the following formula is created:
Max((ParallelGCThreads#+2)/4,1)
- Note
-
The calculated value is rounded down to the nearest integer. Max(A,B) indicates that the larger value of A and B is to be selected.
- #
-
ParallelGCThreads is the value specified in -XX:ParallelGCThreads.
When you specify this option, note the following points:
-
If you specify 1, parallel execution is performed for a single thread, resulting in a decrease in execution performance.
-
If you specify a value that exceeds the number of threads that can be created in the execution environment, Java VM cannot start, because the creation of Concurrent Marking processing threads during Java VM startup fails.
-
The Concurrent Marking processing threads cannot be created in excess of the number of GC threads. If you specify a value that exceeds the number of GC threads, the following message is output to the standard output, and Java VM fails to start.
Error occurred during initialization of VM Can't have more ConcGCThreads than ParallelGCThreads.
-
If the specified value is outside the valid range, the following message is output to the standard output, and Java VM terminates with the return code 1.
Invalid number of concurrent marking threads: -XX:ConcGCThreads=[specified_value]
- Prerequisite option
-
-
-XX:+UseG1GC
-
- Related option
-
-
-XX:ParallelGCThreads
-
Syntax
-XX:ConcGCThreads=integer_value