Efforts to enhance Java program startup instances and efficiency are set to incorporate enhancing assist for archived Java heap objects in CDS (class data sharing).
The plan, made public by Ioi Lam of Oracle in an OpenJDK community RFC final month, aligns with Project Leyden, an effort to enhance startup instances for Java functions in addition to instances to peak efficiency and program footprints. Lam famous that Challenge Leyden is prone to make intensive use of archived Java heap objects.
Targets of the CDS enchancment plan embody uniform assist of CDS for all collectors and minimizing the code wanted for every collector to assist CDS. CDS itself is meant to cut back utility startup instances, specifically for smaller functions. CDS is supported solely with the Java HotSpot consumer VM and solely with the serial rubbish collector.
The CDS enchancment plan requires:
- Eradicating the G1 rubbish collector dependency for writing the archive heap; a working prototype already has been developed.
- Consolidating the archive heap right into a contiguous block. The intent is to make it straightforward to mmap (reminiscence map) the archive heap into completely different collectors. Removing of G1 archive area sorts is also deliberate as a part of this step.
- Implementation of mmap of the archive area for different collectors. The implementation is anticipated to be pretty easy.
As of Java Development Kit (JDK) 20, which is due as a manufacturing launch in March, implementers of the plan should cope with limitations together with CDS archive dumping solely being supported by the G1 collector, G1 having a particular allocation routine for house within the heap, and mmap supported solely in G1.
Offering the impetus for the CDS proposal was a Java growth plan to have uniform APIs for using archived regions. That proposal was launched this previous November.
Copyright © 2023 IDG Communications, Inc.