Energy consumption in software systems is becoming increasingly important, especially in large-scale deployments. However, debugging energy-related issues remains challenging due to the lack of specialized tools. This paper presents an energy debugging methodology for identifying and isolating energy consumption hotspots in software systems. We demonstrate the methodology's effectiveness through a case study of Redis, a popular in-memory database. Our analysis reveals significant energy consumption differences between Alpine and Ubuntu distributions, with Alpine consuming up to 20.2% more power in certain operations. We trace this difference to the implementation of the memcpy function in different C standard libraries (musl vs. glibc). By isolating and benchmarking memcpy, we confirm it as the primary cause of the energy discrepancy. Our findings highlight the importance of considering energy efficiency in software dependencies and demonstrate the capability to assist developers in identifying and addressing energy-related issues. This work contributes to the growing field of sustainable software engineering by providing a systematic approach to energy debugging and using it to unveil unexpected energy behaviors in Alpine.
翻译:软件系统的能耗问题日益重要,尤其是在大规模部署场景中。然而,由于缺乏专用工具,调试与能量相关的问题仍然具有挑战性。本文提出了一种能量调试方法,用于识别和隔离软件系统中的能耗热点。我们通过对流行内存数据库Redis的案例研究,展示了该方法的有效性。我们的分析揭示了Alpine与Ubuntu发行版之间存在显著的能耗差异,在某些操作中Alpine的功耗高出达20.2%。我们将此差异追溯至不同C标准库(musl与glibc)中memcpy函数的实现。通过隔离并基准测试memcpy,我们确认其是能量差异的主要原因。我们的研究结果强调了在软件依赖中考虑能效的重要性,并展示了协助开发者识别和解决能量相关问题的能力。这项工作通过提供系统化的能量调试方法,并利用该方法揭示Alpine中未预期的能量行为,为可持续发展的软件工程领域做出了贡献。