JDK-7114376 : Make system dictionary hashtable bucket array size configurable
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs23,7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-11-21
  • Updated: 2017-07-19
  • Resolved: 2012-02-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8 Other
7u4Fixed 8Fixed hs23Fixed
Related Reports
Relates :  
Relates :  
Description
The System Dictionary hashtable bucket array size is fixed at 1009.  See
the definition of SystemDictionary::_nof_of_buckets in
src/share/vm/classfile/systemDictionary.hpp.

This value is too small for large programs with many names, too large for
small programs and just about right for medium sized ones.  The default should
remain at 1009, but it should be possible to override it on the command line.
The switch could be defined as -XX:SystemDictionarySize=<n>.
There has been a request to dynamically resize the SystemDictionary so that most customers do not have to add a command-line flag. This would be in addition to a command-line flag that would allow explicitly setting a starting size for the SystemDictionary.

Update: the actual flag introduced is -XX:PredictedLoadedClassCount=<n>.
Comments
EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/b2cd0ee8f778
22-03-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-main/hotspot/rev/b2cd0ee8f778
03-02-2012

SUGGESTED FIX Added new flag: -XX:+UnlockExperimentalVMOptions -XX:PredictedClassLoadCount=# to allow the customer to inform the system of expected number of loaded classes. This can be used today to tune the initial size of the internal system dictionary hashtable bucket array, and in future could be used to tune a different internal data structure.
03-02-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/b2cd0ee8f778
31-01-2012

EVALUATION Implement as suggested in Description.
21-11-2011