How Much Energy Does Building Distro Packages Use

How Much Energy Does Building Distro Packages Use

How Much Energy Does Building Distro Packages Use 09 November 2026 ·updated 10 November 2026 Some metrics

构建发行版软件包需要多少能源?2026年11月9日 · 更新于2026年11月10日 一些指标

When I set up the infrastructure for Casuarina Linux I repurposed an AMD AM4 system with Ryzen 9 5950X 16-Core CPU (105W TDP) and 32Gb of DDR4 RAM as the build server. I set it up in our laundry, connected it via a smart plug, and reset its counters.

当我为 Casuarina Linux 搭建基础设施时,我将一台配备 Ryzen 9 5950X 16 核 CPU(105W TDP)和 32GB DDR4 内存的 AMD AM4 系统重新利用为构建服务器。我把它放在洗衣房里,通过智能插头连接,并重置了它的计数器。

Over the course of the project I would regularly pull package updates from Chimera Linux, build and install them locally, and then push them to the repo, which would trigger Buildbot to build and publish them. The project ran from 30 March 2026 to 8 November 2026 (a bit over 7 months) the total energy used was 98.4 kWh.

在项目期间,我会定期从 Chimera Linux 拉取软件包更新,在本地构建并安装,然后将它们推送到仓库,这会触发 Buildbot 进行构建和发布。该项目从 2026 年 3 月 30 日运行到 2026 年 11 月 8 日(超过 7 个月),总耗电量为 98.4 kWh。

My electricity plan is a 100% renewable plan (meaning they offset the non-renewable parts) and costs AU$0.33 kWh. Ignoring the daily service fee the cost of that electricity is AU$32.47 .

我的电力套餐是 100% 可再生能源套餐(意味着他们会抵消非可再生部分),费用为每千瓦时 0.33 澳元。忽略每日服务费,这些电力的成本为 32.47 澳元。

Since it turned out I was the only one doing package updates I kept the builder off when idle. When there were packages to build I’d hit the power button (on the machine, not the smart plug) and some time later when it was done I’d press it again to shut it down. This was pretty beneficial as the idle draw was about 55W.

由于事实证明我是唯一一个进行软件包更新的人,我在空闲时会保持构建器关闭。当有软件包需要构建时,我会按下电源按钮(在机器上,而不是智能插头上),过一段时间完成后,我会再次按下它来关机。这非常有益,因为空闲功耗约为 55W。

The number of package builds was around 5000. SELECT COUNT(name) FROM logs WHERE name LIKE ‘pkg:%’; from the Buildbot state.sqlite yields 5201, however that’s probably slightly inflated due to rebuilds/packages that failed to build on the first try.

软件包构建数量约为 5000 个。从 Buildbot 的 state.sqlite 中执行 SELECT COUNT(name) FROM logs WHERE name LIKE 'pkg:%'; 得出的结果是 5201,但这可能因为重新构建或首次尝试构建失败的软件包而略有夸大。

The actual usage is likely more than double the 98kWh figure as all packages were built on my desktop machine first, before pushing to the repository for the builder to pick up. That machine is an AM5 system with AMD Ryzen 9 9950X3D 16-Core CPU (170W TDP), 64Gb DDR5 RAM.

实际用电量很可能是 98kWh 这个数字的两倍多,因为所有软件包都是先在我的台式机上构建,然后再推送到仓库供构建器获取。那台机器是一台 AM5 系统,配备 AMD Ryzen 9 9950X3D 16 核 CPU(170W TDP)和 64GB DDR5 内存。

Additionally our house has rooftop solar, and where possible I would kick off builds during the day so there was a better chance of using the solar. That would have reduced the actual cost, but I have no way to measure the specific amount.

此外,我们家有屋顶太阳能,只要可能,我会在白天启动构建,这样更有机会使用太阳能。这本可以降低实际成本,但我无法测量具体金额。

The slowest package by far to build was Chromium, taking just shy of 4 hours to complete. For comparison Firefox takes about 50 minutes. Power draw measured by the smart plug when the builder was fully loaded is about 193W. So 4 hours at 193W is 0.77kWh, which means a Chromium build costs about 25 cents.

到目前为止,构建最慢的软件包是 Chromium,耗时近 4 小时。相比之下,Firefox 大约需要 50 分钟。当构建器满载时,智能插头测得的功耗约为 193W。因此,193W 运行 4 小时为 0.77kWh,这意味着构建一次 Chromium 的成本约为 25 美分。

Overall it cost a bit under AU$5 a month (ignoring solar, and my workstation) to build all the packages for a Linux distribution. That’s not too bad I think. Stay in touch! Follow me on the ⁂ Fediverse, subscribe to the feed, or send me an email. I also publish new posts as emails in my newsletter. Subscribe to Newsletter

总的来说,为一个 Linux 发行版构建所有软件包每月花费不到 5 澳元(忽略太阳能和我的工作站)。我认为这还不错。保持联系!在 Fediverse 上关注我,订阅源,或给我发电子邮件。我也会将新文章作为电子邮件发布在我的时事通讯中。订阅时事通讯。