Paul Krill
Editor at Large

ZGC large-heap Java garbage collector may go open source

news
Oct 27, 20172 mins

Votes are due by November 8 to approve the project request, which could compete with Red Hat’s Shenandoah

computer waste junk pile
Credit: Dokumol

An Oracle-developed, low-latency Java garbage collector geared to large heaps could move to the open source community, if a proposal to do so gets community approval. Votes are due by November 8.

Called the Z Garbage Collector (ZGC), the project is designed to support multiterabyte heaps, have pause times not exceeding 10 milliseconds, and offer no more than a 15 percent application reduction throughput compared to the G1 garbage collector.

But ZGC’s developers don’t see these goals as “hard requirements” for every workload, according to a proposal floated on an OpenJDK mailing list by Per Liden, a member of the HotSpot virtual machine team at Oracle. Liden’s proposal calls for creation of a ZGC project that he would lead, with the HotSpot group as sponsor. 

With ZGC, operations such as object loading can be done concurrently while application threads are running. ZGC executes tasks including marking, reference processing, and relocation/compaction. Remaining tasks, including class unloading and weak root processing, are made concurrent.

A core design principle in ZGC is the use of load barriers and colored object pointers. The act of loading a reference field object in a Java object is subject to load barrier; a colored object pointer has information used by the load barrier to determine if an action must be taken before allowing a Java thread to use the pointer. Colored pointers, Liden said, enable reclaiming and reuse of memory during the relocation and compaction phase, before pointers pointing to the reclaimed region have been fixed. This helps keep general heap overhead down.

Some of the work from the ZGC project already has found a use case elsewhere, including an atomics rewrite and a garbage-collection barrier API. 

ZGC could compete for attention with Red Hat’s Shenandoah Java garbage collection project, which also has been intended for large-heap applications.

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