CI/CD流水线的环境影响
Environmental Impact of CI/CD Pipelines
AI总结:
本研究调查了使用GitHub Actions的碳和水足迹(CWF),基于220万次工作流运行数据评估了其环境影响,并提出了在低影响地区部署运行器等减排策略。
摘要:
CI/CD流水线在软件开发中被广泛使用,然而其环境影响,特别是碳足迹和水足迹(CWF),在很大程度上仍然不为开发者所知,因为CI服务提供商通常不披露此类信息。随着云计算对环境影响日益增大,了解CI/CD服务的CWF变得愈发重要。本研究调查了使用GitHub Actions的CWF,重点关注标准运行器可免费且无限制使用的开源代码库。我们基于Cloud Carbon Footprint框架的方法,并使用了迄今为止文献中报道的最大规模的工作流运行数据集,包含来自超过18,000个代码库的220万次以上的工作流运行。我们的分析表明,GitHub Actions生态系统产生了巨大的CWF。我们对2024年碳足迹的估计范围从最乐观情景下的150.5 MTCO2e到最悲观情景下的994.9 MTCO2e,而水足迹范围从1,989.6到37,664.5千升。最可能情景下的估计值为碳足迹456.9 MTCO2e和水足迹5,738.2千升。为了提供直观视角,最可能情景下的碳足迹相当于7,615棵城市树木一年捕获的碳量,而水足迹则相当于一个普通美国家庭5,053年的用水量。我们探讨了减轻这种影响的策略,主要是通过减少浪费的计算资源。关键建议包括:在能源生产环境影响较小的地区(如法国和英国)部署运行器;对计划运行实施更严格的停用策略,并使其执行与区域能源组合在环境上更有利的时期保持一致;以及减小代码库的规模。
英文摘要:
CI/CD pipelines are widely used in software development, yet their environmental impact, particularly carbon and water footprints (CWF), remains largely unknown to developers, as CI service providers typically do not disclose such information. With the growing environmental impact of cloud computing, understanding the CWF of CI/CD services has become increasingly important. This work investigates the CWF of using GitHub Actions, focusing on open-source repositories where usage is free and unlimited for standard runners. We build upon a methodology from the Cloud Carbon Footprint framework and we use the largest dataset of workflow runs reported in the literature to date, comprising over 2.2 million workflow runs from more than 18,000 repositories. Our analysis reveals that the GitHub Actions ecosystem results in a substantial CWF. Our estimates for the carbon footprint in 2024 range from 150.5 MTCO2e in the most optimistic scenario to 994.9 MTCO2e in the most pessimistic scenario, while the water footprint ranges from 1,989.6 to 37,664.5 kiloliters. The most likely scenario estimates are 456.9 MTCO2e for carbon footprint and 5,738.2 kiloliters for water footprint. To provide perspective, the carbon footprint in the most likely scenario is equivalent to the carbon captured by 7,615 urban trees in a year, and the water footprint is comparable to the water consumed by an average American family over 5,053 years. We explore strategies to mitigate this impact, primarily by reducing wasted computational resources. Key recommendations include deploying runners in regions whose energy production has a low environmental impact such as France and the United Kingdom, implementing stricter deactivation policies for scheduled runs and aligning their execution with periods when the regional energy mix is more environmentally favorable, and reducing the size of repositories.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。