Treffer: Java 21’s ZGC vs Shenandoah GC garbage collectors in a multithreaded test application: An performance evaluation experiment

Title:
Java 21’s ZGC vs Shenandoah GC garbage collectors in a multithreaded test application: An performance evaluation experiment
Publisher Information:
Stockholms universitet, Institutionen för data- och systemvetenskap
Publication Year:
2025
Collection:
Stockholm University: Publications (DiVA)
Document Type:
Dissertation bachelor thesis
File Description:
application/pdf
Language:
English
Rights:
info:eu-repo/semantics/openAccess
Accession Number:
edsbas.FDAFB29A
Database:
BASE

Weitere Informationen

Java's garbage collection systems can significantly influence application performance, especially in memory intensive and multithreaded environments. This study compares the Z Garbage Collector (ZGC) and Shenandoah GC, focusing on their efficiency under one high RAM usage scenario. This paper defines characteristics that a class of programs share and implement these in a custom-built Java 21 benchmark program. The problem this thesis highlights is towards a class of programs, like High-Frequency Trading (HFT), requiring high throughput and as efficient GC handling as possible. This follows up with the research question basing itself upon the difficulty to choose which of these two GC’s to pick, when a program shares a combination of these predefined characteristics. Through an experiment methodology with our self-written benchmark program, the research evaluates key metrics such as throughput, latency, and heap utilization. Results indicate that ZGC outperforms Shenandoah GC in a high RAM usage scenario, maintaining optimized heap usage and lower GC pauses. Shenandoah excels in a less memory-intensive medium RAM usage scenario, demonstrating higher throughput. These findings contribute to making informed decisions when selecting suitable GCs based on application requirements, emphasizing energy efficiency and resource optimization. Future research could explore broader real-world implementations and the sustainability implications of GC strategies. This paper also highlights the role of garbage collector configurations in aligning software performance with hardware capabilities. By selecting GC to specific application demands, developers can achieve more predictable performance, reduced operational costs, and enhanced system longevity. This research highlights the importance of understanding the exchange between latency and throughput. Offering insights into how GC selection can impact application performance but also broader considerations such as RAM consumption and consequently sustainability in large-scale ...