JDK-6749430 : Java app (in Solaris default ptocessor set) allocates incorrect number processors to parallelGC
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 6u4
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_10
  • CPU: generic
  • Submitted: 2008-09-17
  • Updated: 2011-12-27
  • Resolved: 2008-09-17
Related Reports
Duplicate :  
Description
Customer has 16 processor Solaris server configured with as follows:
- Processor set 1: 11 processors
- Default processor set: 5 processors

A java application was started in the deafult processor set. The following command was executed to list number of processors allocated to parallelGC.
$ jinfo -flag ParallelGCThreads 10993   (where 10993 was the pid)
jinfo response: -XX:ParallelGCThreads=13

This indicates all 16 procesors were used to calculate the default number of processors to allocate to parallel GC. The algorithm used for this calculation is:
          (ncpus <= 8) ? ncpus : 3 + ((ncpus * 5) / 8)
The correct answer should have been 5 processors based on a value of ncpus of 5 available in the default processor set.

Fix requires the no of GC threads to be adjusted based on os::active_processor_count() available to the unbound Java process.

Comments
EVALUATION This is a duplicate of 6673124. The VM does not take into account the existence of processor sets that it is not in when determining the number of available processors. Correcting this is simple but the danger - as noted here - is that people affected by the bug may not realize it and the fix will change the runtime behaviour of apps that are considered fully tuned. A flag may be needed to restore the broken behaviour.
17-09-2008