Setting the number of helper threads that the garbage collector (GC) uses for concurrent operations on a multiprocessor system
 Technote (troubleshooting)
 
Problem(Abstract)
Setting the number of helper threads for garbage collection on a multiprocessor system
 
Cause
During garbage collection, object marking increases through the addition of helper threads and a facility that shares work between those threads. Parallel Mark still requires the participation of one application thread, which is used as the master coordinating agent.
 
Resolving the problem
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.

 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java SDK
Operating system(s): Windows
Software version: 5.1
Software edition:
Reference #: 1162248
IBM Group: Software Group
Modified date: Mar 31, 2006