JDK-8048150 : Allow easy configurations for large CDS archives
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-06-25
  • Updated: 2017-05-19
  • Resolved: 2014-08-25
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 8 JDK 9
8u40Fixed 9 b30Fixed
Related Reports
Relates :  
Relates :  
Description
In JDK8, if you want to create a large CDS archive (with a lot of classes), you need to add VM options like these

-XX:SharedReadWriteSize=200000000 -XX:SharedReadOnlySize=200000000 -XX:SharedMiscDataSize=22000000

which is kind of cumbersome. It's better to have higher-level options like:

-XX:+UseLargeSharedArchive  -> allow up to 300MB combined archive size
-XX:+UseHugeSharedArchive  -> allow up to 800MB combined archive size


Comments
Based on review feedback, instead of adding new -XX options, we will count the number of classes in the classlist file and estimate the size of various regions based on the number of classes. The percentage of allocation for the 4 regions will be: ro (40%), rw (55%), md (3%), mc (2%)
21-08-2014