Garbage Collection and Energy Consumption in Java: A Controlled Study Across Workloads and JDKs
Rahil Sharma
Key points
From the paper's conclusion- Overall, the results do not support a universally energy-optimal garbage collector; instead, workload intensity emerges as the more reliable lever for managing Java energy consumption, and collector selection should be treated as an application-specific tuning decision supported by measurement on the target system rather than aggregate rankings alone.
Abstract
Garbage-collector selection is a low-effort configuration decision that can influence both the performance and energy consumption of Java applications. However, it remains unclear whether aggregate energy rankings among collectors generalise across heterogeneous applications, workload intensities, and JDK distributions. This study presents a controlled empirical evaluation of Serial, Parallel, and G1 garbage collection across three Java applications, three workload intensities, and two JDK distributions: OpenJDK and Oracle JDK. Using EnergiBridge, processor-package energy consumption and execution time were measured and complementary energy-performance metrics derived. Across all evaluated configurations, Parallel recorded the lowest mean energy consumption (839.8 J), followed closely by Serial (857.6 J) and G1 (969.0 J), but an RCBD ANOVA did not establish a statistically reliable collector effect. Workload intensity, by contrast, was a significant driver of energy consumption, with heavy workloads consuming substantially more energy than light or medium workloads regardless of collector. Energy consumption showed a moderate positive association with execution time (r = 0.33), indicating that longer-running configurations tended toward higher energy use, though the relationship was far from proportional. No statistically significant energy difference was found between OpenJDK and Oracle JDK. Overall, the results do not support a universally energy-optimal garbage collector; instead, workload intensity emerges as the more reliable lever for managing Java energy consumption, and collector selection should be treated as an application-specific tuning decision supported by measurement on the target system rather than aggregate rankings alone.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Uncovering Hidden Memory Costs for Garbage CollectionProceedings of the ACM on Programming Languages · 2026
- Systematic Detection of Energy Regressions in Software Version HistoriesarXiv · 2026
- Artificial Intelligence for Energy Optimization in Data CentersarXiv · 2026
- Measuring and Optimizing Energy Efficiency in ICT: A Multi-vocal Literature Review on Data Centers, Cloud Computing, and LLM-Driven Code OptimizationarXiv · 2026
- CheckCo: Checkpoint-Coordinated Load Balancingfor Skewed Event Streams at ScalearXiv · 2026
- Energy-Aware Performance Characterization of Kokkos Kernels Across Precision LevelsarXiv · 2026