Software stack upgrades are a routine part of software maintenance and evolution, typically motivated by improved performance, stability, or functionality. Yet their impact on energy consumption - a growing concern for organizations pursuing sustainability - remains poorly understood. This paper presents a systematic method for measuring how different versions of core software stack components, such as Spring Boot and the Java Virtual Machine (JVM), influence the energy consumption of applications. Our approach evaluates combinations of framework versions, runtime versions, and execution platforms through automated benchmarking. Using a case study based on the Spring Petclinic REST application, we show that energy consumption varies substantially across Spring Boot and JVM versions, in some cases producing unexpected regressions. Notably, newer JVM releases and virtual threads (introduced in Java 21 and 23) yielded significant energy savings without requiring application changes. These results demonstrate that software upgrades can meaningfully affect energy usage and that measuring energy consumption provides valuable evidence for decision making in software maintenance and evolution.
翻译:软件栈升级是软件维护与演化中的常规操作,通常以提升性能、稳定性或功能为目的。然而,其对能源消耗的影响——这一组织在追求可持续性时日益关注的议题——尚不明确。本文提出一种系统化方法,用于测量核心软件栈组件(如Spring Boot和Java虚拟机(JVM)的不同版本)如何影响应用程序的能耗。我们的方法通过自动化基准测试,评估了框架版本、运行时版本及执行平台的组合效果。基于Spring Petclinic REST应用程序的案例研究表明,不同Spring Boot和JVM版本间的能耗存在显著差异,某些情况下甚至出现意外的性能退化。值得注意的是,较新版本的JVM发布(Java 21和23中引入的虚拟线程)在无需修改应用程序的前提下实现了显著的能耗节约。这些结果证明,软件升级能够对能耗产生实质性影响,且能耗测量可为软件维护与演化的决策提供有价值的依据。