Generational Z Garbage Collector would lower garbage collection CPU overhead, lower heap memory overhead, and reduce the risk of allocations stalls, OpenJDK proposal says. Credit: Gregory Hayes A proposal floating in the Java community would improve application performance by extending the ZGC (Z Garbage Collector) to maintain separate generations for young and old objects. This would allow ZGC to more frequently collect young objects, which tend to die young, Java’s developers said. Specific goals of the OpenJDK Java Enhancement Proposal (JEP) for generational ZGC include lower risks of allocation stalls, lower required heap memory overhead, and lower garbage collection CPU overhead. These benefits should come without significant throughput reduction compared to non-generational ZGC, the proposal states. Designed for scalability and low latency, ZGC has been available as a production release since Java Development Kit (JDK) 15 in September 2020. With ZGC, most work is done with application threads running. Pause times for ZGC consistently are measured in microseconds, whereas pause times for the default G1 collector range from milliseconds to seconds. Thus, for many workloads, ZGC can solve latency problems related to garbage collection, the proposal states. ZGC works well when there are sufficient resources. But because ZGC stores all objects together, regardless of age, it must collect all objects every time it runs. Because young objects tend to die young, while older objects tend to stay around (per the weak generational hypothesis), collecting young objects requires fewer resources and yields more memory while collecting old objects takes more resources and yields less memory. Generational ZGC is currently not designated for any specific version of standard Java. The current release, JDK 20, arrived a week ago while the next release, JDK 21, is due in September. Standard Java is on a six-month release cadence. Related content feature What is Rust? Safe, fast, and easy software development Unlike most programming languages, Rust doesn't make you choose between speed, safety, and ease of use. Find out how Rust delivers better code with fewer compromises, and a few downsides to consider before learning Rust. By Serdar Yegulalp Nov 20, 2024 11 mins Rust Programming Languages Software Development how-to Kotlin for Java developers: Classes and coroutines Kotlin was designed to bring more flexibility and flow to programming in the JVM. Here's an in-depth look at how Kotlin makes working with classes and objects easier and introduces coroutines to modernize concurrency. By Matthew Tyson Nov 20, 2024 9 mins Java Kotlin Programming Languages analysis Azure AI Foundry tools for changes in AI applications Microsoft’s launch of Azure AI Foundry at Ignite 2024 signals a welcome shift from chatbots to agents and to using AI for business process automation. By Simon Bisson Nov 20, 2024 7 mins Microsoft Azure Generative AI Development Tools news Microsoft unveils imaging APIs for Windows Copilot Runtime Generative AI-backed APIs will allow developers to build image super resolution, image segmentation, object erase, and OCR capabilities into Windows applications. By Paul Krill Nov 19, 2024 2 mins Generative AI APIs Development Libraries and Frameworks Resources Videos