JDK-8338912 : CDS: Segmented roots array
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 24
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-08-23
  • Updated: 2024-09-27
  • Resolved: 2024-09-16
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 24
24 b16Fixed
Related Reports
Blocks :  
Blocks :  
Relates :  
Relates :  
Relates :  
Description
Attempt to drop the min region alignment with JDK-8337828 highlights an interesting trouble. The roots array we are creating during the dump time can easily be larger than the min region alignment. We are currently "lucky" none of our tests hit this limit. AFAICS, about 128K classes would be enough to hit the current 1M min region alignment. Dropping the min region alignment to 256K  starts to fail the test with "only" 30K classes, JDK-8338856.

There might be a way to allow larger roots count. For example, we can try and slice the roots array, and thus let the individual slices be sized below min region alignment. It remains to be seen how hard is that, and what performance implications it has.
Comments
Changeset: dc00eb87 Branch: master Author: Aleksey Shipilev <shade@openjdk.org> Date: 2024-09-16 05:33:40 +0000 URL: https://git.openjdk.org/jdk/commit/dc00eb87bc28ed5bf499af6835c3df474c454a41
16-09-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/20858 Date: 2024-09-04 18:44:37 +0000
04-09-2024

I have got a prototype that segments the array, currently cleaning it up and testing it: https://github.com/openjdk/jdk/compare/master...shipilev:JDK-8338912-cds-segmented-roots
03-09-2024

A short term work-around would be to disable archiving of the heap objects when the root array is too big. This will allow "regular" programs to benefit with CDS for Shenandoah while a proper solution is made.
03-09-2024