IBM® Developer Kit and Runtime Environment Java™ 2
Technology Edition provides the -Xgcthreads command-line
parameter. The parameter sets the number of helper threads that the GC
uses for concurrent operations:
-Xgcthreads<N>
On a system with N processors, the default setting for
-Xgcthreads is N–1 when the Java Virtual Machine (JVM)
is in resettable mode, and N when it is not in resettable mode.
The resettable JVM is available only on z/OS®.
Note: A platform with N processors also has N-1
new helper threads, which work with the master thread to complete the
marking phase of garbage collection. The default number of threads can be
overridden with the -Xgcthreads parameter. A value of 1
results in no helper threads. Values of 1 through N are
accepted.
For example: If you use -Xgcthreads2, you have one
helper thread.
On a single processor system, no helper threads run. The disabling of
helper threads disables concurrent operations at the cost of performance
and might expose problems in this area. No advantage is gained if you
increase the number of helper threads above the default setting; IBM
strongly recommends against this practice.
|