一句话:评估 JoularJX 与 OTJAE 两个基于 CPU 需求的 Java 能耗模型在进程和事务层面的准确性。
软件能耗难以直接量化,因为能耗实际由运行软件的硬件产生。在虚拟化或容器化环境中,RAPL 等直接测量往往不可用,因此常根据 CPU、内存、存储或网络利用率等指标建立能耗模型进行估算。本文评估 JoularJX 与 OpenTelemetry Java-Agent 扩展(OTJAE)及其底层基于 CPU 需求的模型,在 Java 应用的进程与事务层面计算能耗的准确性,并与硬件服务器实测结果对比。结果表明,在中高负载(CPU 利用率 50% 至 100%)下模型预测与实测高度吻合,但在较低负载下差异显著。
The energy consumption of software systems is hard to quantify because software does not consume energy itself but rather the hardware that it runs on. To address this challenge, technologies such as the Intel Running Average Power Limit (RAPL) interface have been developed to measure the energy consumed by various hardware resources at runtime. Additionally, specialized tools like JoularJX have been created to attribute RAPL measurements to individual software systems and their components. However, these tools are typically limited to software running directly on a server, without virtualization or containerization. In virtualized or containerized environments, direct energy measurements are only possible if the hypervisor or container runtime forwards this information to the guests—a practice not widely adopted, particularly in cloud environments. In such cases, energy consumption models are used to estimate software energy usage based on other metrics, such as CPU, memory, storage, or network utilization. One recently released tool following this approach is the OpenTelemetry Java-Agent extension (OTJAE), making it suitable for environments where direct measurements are not feasible. This study aims to evaluate the accuracy of JoularJX and OTJAE, along with their underlying models, in calculating energy consumption at both the process and transaction levels of Java applications. Both models under examination are based on CPU demand measurements. We are able to show that the model predictions match actual measurements obtained from a hardware server with high accuracy in medium and high load scenarios (50% to 100% CPU utilization) but vary significantly for lower load levels.