ZGC large-heap Java garbage collector may go open source

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.

IDG Insider


« How to back up your PC, laptop, phone and tablet for free


HTC has a VR bundle with a Vive, GTX 1070, and Fallout 4 VR for $800 »
IDG News Service

The IDG News Service is the world's leading daily source of global IT news, commentary and editorial resources. The News Service distributes content to IDG's more than 300 IT publications in more than 60 countries.

  • Mail


Do you think your smartphone is making you a workaholic?