How Much Energy Does Building Distro Packages Use
101 points by wezm
101 points by wezm
This was pretty beneficial as the idle draw was about 55W.
Over 7 months, this would be have been around 275kWh: almost 3 times the reported consumption of 98kWh!
So idle draw is a very important factor, which I think is too often ignored (this is a perfect counter example, where it was taken into account: congrats!)
Thank you. I was a bit surprised that the idle draw is that high. Certainly shows how much there is to gain from getting that value down.
For all that they do well idle draw is definitely an issue of AMD CPUs.
The 5950X is a Zen 3 CPU, it's possible that it's improved since then. Not sure if it's because it's a 28W part, or Zen 5, but my laptop with Ryzen AI 7 350 CPU idles around 4W, with the (OLED) screen on (according to btop).
Part of the issue AIUI is that the Infinity Fabric link between the compute and IO dies is a significant part of the large baseline power use. The laptop chips are monolithic dies and as such don’t have this issue. Desktop Zen 5 chips still follow this design and likely have high idle power accordingly.
The last time they tackled this segment of the market was the EPYC 3000 embedded line on Zen 1, released 2018. The EPYC 3251 was 16-threads and 55w tdp and absolutely blew away the Xeons in the same tdp segment. But I guess they just didn’t sell enough cause other than a small refresh they have not released a successor. Full system power figures from ServeTheHome:
Power off BMC only: 4.7W
OS Idle: 29.9W
100% Load: 69.2W
Maximum Observed: 76.1W
30W idle isn't nothing, but (a) that was Zen 1 and (b) it was MUCH faster than anything in that category.
I can't predict how granular the data would be, but if you are curious about which hardware components contribute to that idle draw, I have a tool that may help.
Very cool to see this measured! I'd love to see things like build jobs get queued until lots of solar energy was available, then executed until the renewable energy went away. I know this was done somewhat manually in this case, but automating that would be really cool. Build jobs are a great opportunity to shift work through time to when energy is abundant.
The solar system on our house is 15 years old and I have no insight into generation aside from looking at the little LCD on the inverter itself. However, I live in a sunny location (Sunshine Coast, Australia), so you'd get a long way from just having the builder shutdown a hour or two before sunset and and come back on an hour or two after sunrise.
That makes sense. I intended this as a broader "I wish we did this work shifting for most batch processing" rather than as any criticism of your setup. I think solar build servers in the same vein as https://solar.lowtechmagazine.com/about/the-solar-website/ would be really cool, and probably the best available way to handle building distro packages within an energy budget.
This is so cool! I've been obsessed with thinking about this for NixOS/Nixpkgs for months, and have been trying to reason about ways to get energy usage down.
One of the (small) ways I've been approaching this is the strictDeps migration that is happening across the repo. It does a couple of things related to separating build vs runtime dependencies and cross-comp, but one side effect is that less dependencies may be downloaded when installing a package (specifically, build time dependencies may not be downloaded when substituting the pre-built package from a binary cache)!
It's a small save for a single user, but I've been thinking about it at a wide scale: for thousands of users of a package, the electricity saved by not downloading and storing the extra dependencies adds up over saved network transmission costs (every packet requires energy to be routed through routers, switches, etc.) over these thousand users adds up. Now, do this calculation for the few hundreds (thousands?) of packages in a modern NixOS system. Surely, this is greater than 0 savings.
I should estimate power usage on my m68k, VAX, SuperH, earmv4 and other build machines. That could be interesting.
Answer: 98.4 kWh for about 5000 package builds, equal to about 650 km of driving (assuming some random numbers I found for this on the internet are accurate at all). Meaning building a package was equal to about 130 meters of driving! :)