Skip to content
Preprint

Opportunistic ZGC: Leveraging Idle Cores for More Effective Concurrent Garbage Collection

Sep 2026 · 0 citations · 30 references
Computer Science

TL;DR

Oppistic ZGC (OppZGC), a feedback-directed ZGC scheduling policy that constrains the heap dynamically and automatically, without per-application tuning is proposed, which reduces maximum heap usage for DaCapo benchmarks by between 61% and 90%, on average, depending on configuration.

Abstract

Managed language runtimes often provide concurrent garbage collectors so that latency-critical applications with large working sets can keep running while most collection work proceeds in the background. ZGC is a production-quality, generational, concurrent collector in OpenJDK with sub-millisecond pause times. While ZGC is designed to run concurrently, frequent and excessive collections with ZGC can still slow the mutators due to synchronization costs and interference with shared computing resources. Hence, the ZGC scheduler is conservative by default, and in most cases, will grow the heap toward the maximum allowed before scheduling a collection. While this approach minimizes collection effort, it can be wasteful, or even harmful, if the maximum heap size is not well tuned to the actual working set. We propose Opportunistic ZGC (OppZGC), a feedback-directed ZGC scheduling policy that constrains the heap dynamically and automatically, without per-application tuning. OppZGC identifies periods when CPU cores are underutilized and leverages them for concurrent collection with ZGC. We describe the design and implementation of OppZGC in OpenJDK's HotSpot Java VM and evaluate it with standard and latency-sensitive benchmarks from DaCapo Chopin and SPECjbb. OppZGC limits heap usage when there is CPU capacity sufficient for additional collections, and avoids scheduling extra collections when they would substantially degrade performance. Overall, it reduces maximum heap usage for our DaCapo benchmarks by between 61% and 90%, on average, depending on configuration, with minimal impact on throughput and request latency compared to default ZGC.

View source

Similar papers

Open access Oct 2026

AsyncLeakBench: A Curated Benchmark of Asynchronous Resource Leaks in Open-Source Java Projects

Asynchronous programming is widely used in modern Java software, including server-side processing, network I/O, reactive streams, task scheduling, and RPC communication. Unlike synchronous executions, resource creation and release in asynchronous programs are distributed across callbacks, Future/Promise chains, threads...

Jinyoung Kim, Jinseok Heo, Dongwook Choi et al. · 0 citations
Open access Sep 2026

Optimizing Memory Management and Garbage Collection Overhead in Cloud-Native Java Applications

This paper investigates strategies for optimizing memory management and minimizing GC overhead in cloud-native Java applications, and analyzes modern garbage collection algorithms, evaluate native compilation via GraalVM, explore the memory impact of Virtual Threads, and formulate container-aware tuning strategies for...

Tulsiram Sharma, Shubham Agrawal · 0 citations
Book Open access Sep 2026

Pinning Isn't Enough: Gang-Scheduling Memory-Model Litmus Tests with sched_ext

A spatial gang scheduler reserves dedicated, NUMA-local cores for each test, automatically matching hand-tuned pinning and turning a wildly bimodal rate into a high and predictable one and a temporal gang scheduler time-slices whole tests as units, sustaining high per-test rates even at 2× oversubscription.

Ali Siddiqui, Xiao-Guang Wang · 0 citations
Book Open access Sep 2026

LMTracer: Fine-Grained and Real-Time Performance Profiling for Production LLM Systems

LMTracer is presented, a fine-grained and real-time performance profiling framework for production LLM services that embed profiling logic into the execution through graph-embedded probing and streaming buffered profiling data to CPUs on demand to keep the execution of user kernels uninterrupted.

Wei Liu, Yong-Chao He, Bo-Han Zhao et al. · 0 citations
Jul 2026

CrocSort: Resource-Efficient, Skew-Resilient Parallel External Merge Sort

CrocSort is presented, a byte-balanced parallel external merge sort with configurable memory and per-phase thread settings with practical resource-configuration rules for selecting these settings from input size, memory budget, and thread cap.

Riki Otaki, Charles Benello, Fuheng Zhao et al. · 0 citations
Sep 2026

ThreadShift: Transparent Thread-Level Offloading on Transient Cloud Resources Using MPKs

Transient cloud resources offer significant cost savings, but their unpredictability makes them hard to use for applications that cannot be safely restarted after reclamation. Existing approaches require application changes or rely on coarse-grained checkpointing, whose cost limits its benefits. We present ThreadShift,...

Antoine Murat, Clément Burgelin, R. Guerraoui · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.