arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2608.19520cs.SEcs.PF

Java中的垃圾回收与能耗:跨工作负载和JDK的受控研究

Garbage Collection and Energy Consumption in Java: A Controlled Study Across Workloads and JDKs

Rahil Sharma

首次发表
浏览论文内容

中文总结 AI 辅助

本研究通过受控实验发现Java垃圾回收器无普遍最优能耗表现,工作负载强度是关键驱动因素,垃圾回收器选择需结合目标系统测量的特定应用调优决策。

中文摘要 AI 辅助

垃圾回收器的选择是一项低投入的配置决策,可影响Java应用的性能与能耗,但目前尚不明确不同垃圾回收器间的整体能耗排名是否能在异构应用、工作负载强度及JDK发行版间通用。本研究对Serial、Parallel和G1三种垃圾回收器开展受控实证评估,涉及3款Java应用、3种工作负载强度(轻、中、重)以及2种JDK发行版:OpenJDK与Oracle JDK。采用EnergiBridge测量处理器封装级能耗与执行时间,并推导补充的能耗-性能指标。在所有评估配置中,Parallel的平均能耗最低(839.8 J),其次是Serial(857.6 J)和G1(969.0 J),但随机完全区组设计(RCBD)方差分析未确立垃圾回收器的统计可靠效应。相比之下,工作负载强度是能耗的显著驱动因素,无论采用何种垃圾回收器,重工作负载的能耗均远高于轻或中等工作负载。能耗与执行时间呈中等正相关(r=0.33),表明运行时间更长的配置往往能耗更高,不过该关系远非比例关系。OpenJDK与Oracle JDK之间未发现统计显著的能耗差异。总体而言,研究结果不支持存在普遍能耗最优的垃圾回收器;相反,工作负载强度成为管理Java能耗更可靠的杠杆,垃圾回收器选择应被视为需在目标系统上通过测量支撑的特定应用调优决策,而非仅依据整体排名。

英文摘要

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.

补充信息

↑