Paul Krill
Editor at Large

Java class data sharing upgrade would boost startup times

news
Jan 10, 20232 mins

OpenJDK plan would improve support for archived Java heap objects in class data sharing, aligning with the Project Leyden effort to improve startup performance.

speed fast race car shutterstock 1168856884
Credit: Jamesboy Nuchaikong / Shutterstock

Efforts to improve Java program startup times and performance are set to include improving support for archived Java heap objects in CDS (class data sharing).

The plan, made public by Ioi Lam of Oracle in an OpenJDK community RFC last month, aligns with Project Leyden, an effort to improve startup times for Java applications as well as times to peak performance and program footprints. Lam noted that Project Leyden is likely to make extensive use of archived Java heap objects.

Goals of the CDS improvement plan include uniform support of CDS for all collectors and minimizing the code needed for each collector to support CDS. CDS itself is intended to reduce application startup times, in particular for smaller applications. CDS is supported only with the Java HotSpot client VM and only with the serial garbage collector.

The CDS improvement plan calls for:

  • Removing the G1 garbage collector dependency for writing the archive heap; a working prototype already has been developed.
  • Consolidating the archive heap into a contiguous block. The intent is to make it easy to mmap (memory map) the archive heap into different collectors. Removal of G1 archive region types also is planned as part of this step.
  • Implementation of mmap of the archive region for other collectors. The implementation is expected to be fairly simple.

As of Java Development Kit (JDK) 20, which is due as a production release in March, implementers of the plan must deal with limitations including CDS archive dumping only being supported by the G1 collector, G1 having a special allocation routine for space in the heap, and mmap supported only in G1.

Providing the impetus for the CDS proposal was a Java development plan to have uniform APIs for using archived regions. That proposal was launched this past November.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author