I'm trying to start an informal research collective to find ways to reduce the carbon emissions of popular open source software: https://lowcarbon.software/
I'm looking for strategies for measuring the energy usage of software, to see whether this goal is achievable. Does anyone know of any resources on methods of doing this, beyond e.g. powertop?
@vladh using an outlet that can measure output and correlating with intel power gadget (for certain intel processors)
you could setup an alpine linux server, measure base consumption rate and then exercise the system under test, subtracting the baseline in the end.
@vladh I don't know how to measure it, but it's probably worth thinking about the embedded carbon impact of the systems running the software. When software is available for older machines or lower-end machines, that reduces the amount of new computer hardware that needs to be manufactured, on top of any other impacts of that kind of change.
@vladh
Are you aware of the work that KDE are doing on this theme?
https://eco.kde.org/
@aparrish
@vladh powertop certainly seems like a good starting point if you want to try to calculate it online, but just using a power meter at the wall plug would probably be more realistic.
While you could collect resource usage stats on CPU and memory use, it would be difficult to factor in how much power they each consume.
@vladh software engineering research seems to have settled on the terms "sustainable computing" and "green computing" - a search for the former on arxiv.org (https://arxiv.org/search/advanced?advanced=1&terms-0-operator=AND&terms-0-term=sustainable&terms-0-field=title&classification-computer_science=y&classification-physics_archives=all&classification-include_cross_list=include&date-filter_by=all_dates&date-year=&date-from_date=&date-to_date=&date-date_type=submitted_date&abstracts=show&size=50&order=-announced_date_first) turns up quite a few hits. Much of the journal literature is regrettably paywalled (e.g., https://doi.org/10.1016/j.jss.2023.111944), but most authors will share preprints if emailed.
@vladh Energy Efficiency Across Programming Languages https://greenlab.di.uminho.pt/wp-content/uploads/2017/09/paperSLE.pdf
@vladh I don't know, but the folks in the Climate Action Tech Slack might: https://climateaction.tech/
@vladh KDE has done a lot of work on this
https://blogs.kde.org/2024/04/23/powerdevil-in-plasma-6.0-and-beyond/
https://dot.kde.org/2022/03/10/lets-make-energy-efficient-software-reality
https://archive.fosdem.org/2023/schedule/event/energy_green_software_engineering/
https://archive.fosdem.org/2023/schedule/event/energy_power_profiling_firefox/
@vladh: I'm also interested in the measurement piece. There's so much context. If I use power-hungry software, but my electricity is coming from a solar panel, the carbon use situation is very different than if I was pulling electrons from a coal-fired plant.
I think there's something to explore around writing software that works well on old computers. This discourages buying new hardware in order to keep running the software folx need, which seems like big carbon savings.
@vladh I'd use standard performance monitoring tools. Not only is there a (loose) correlation between how fast a computation completes & how much energy it uses, but also our primary concern should be "Are we the ones pushing people to buy a new computer?"
Embodied energy swamps everything else...
@vladh @charliermarsh and I recently did a presentation at PyCon US about reducing the resource consumption of software development itself (not just the distributed software). It's incredible how much energy is wasted by inefficient CI/CD processes. Thank you for taking on this challenge!
@vladh Also worth looking into the #frugalComputing and #permacomputing tags.
cc @wim_v12e
@vladh I suppose you've probably already tried those but for anyone else looking at the thread for suggestions, wattwise has a good collection of utils.
https://wattwise.games
@vladh one thing I've been pushing is that we still need to think about the total cost of software development on energy - storage, logs, data-in-transfer, data-at-rest.
I remember when we used to care about compressing images and text down to the smallest amount to store and send - cloud computing has made us lazy and forget that.
@vladh this looks like a useful gadget for your purpose https://iotawatt.com/
Logs, dashboards, whatever...
@vladh No problem, very happy to help and keen to see how your project progresses.
@wizzwizz4 Its pretty much the only point I see everyone agreeing on regarding energy-efficient computing!
I particularly like https://solar.lowtechmagazine.com/2009/06/the-monster-footprint-of-digital-technology/ , & I'll ask @gerrymcgovern for more.
As for whether its necessarily true... My best guess is that it'd take a massive reengineering of our entire hardware & software stacks. Probably including new datastorage technologies. Afterall they're doing a lot to be not quite as energy-intensive!
One of the most effective ways of reducing power usage of software would be to prohibit proof of work, and get rid of it. For the fucking love of god, and to save the planet, fix Bitcoin.
The second most effective way to reduce power consumption of software is to get rid of generative AI (GenAI), specifically training (inference is largely harmless).
And in fact everything else does not matter **AT ALL** in the grand picture, and is an utter waste of time.
@isotopp I agree that those things are destructive. But do you have any data regarding what percentage of emissions from software they cause? I think we would need that before concluding anything else is a waste of time.
@vladh The annual electricity report from the International Energy Agency (IEA) says data centers consumed 460TWh in 2022, a figure that could rise to more than 1,000TWh by 2026 in a worst-case scenario
The CBECI estimates that global electricity usage associated with Bitcoin mining ranged from 67 TWh to 240 TWh in 2023, with a point estimate of 120 TWh.
https://www.eia.gov/todayinenergy/detail.php?id=61364
So 110 TWh/460 TWh = 23.9%, almost a quarter of all DC energy use, for Bitcoin alone.
@isotopp This page [1] estimates yearly consumption at 700 TWh for data centres, 1400 TWh for networking, 560 TWh for TVs, and 240 TWh for other consumer devices. So it looks like there are definitely possibilities for impactful change outside data centres, but I have to look into what this means more carefully, e.g. why networking uses this huge amount of power.
GenAI usage is a speculative at the moment, but then I used to plan data centers for a living and what I see going into the DC halls is consistent with these estimates.
The question is mostly if the current hype turns into a business, or if it implodes the way NFTs did – let's hope for the planet that it's a hype and is gone in a few years time.
@isotopp @vladh I have mixed feelings about this. In a strictly technical sense, you are correct, but that's not the only sense that matters here.
Activism isn't really interchangeable; different people can do different things, and crucially *can't* do some things. For example, some of those who might be able to improve energy use of software, may not be able to engage in politics in a meaningful way.
Is it then better if they do nothing at all?
I feel like it ultimately comes down to what the choice is between; if it is between large systemic change and small changes like this, the former is obviously the better option. But if it's between this or nothing... well. Better this than nothing.
So personally I don't see a problem with smaller efforts towards change like this, *as long as* it is explicitly acknowledged that it is only a small first step, and those involved are encouraged to get involved in bigger efforts (like systemic politics) when they are able to. Diversity of tactics and all that.
@chewie Hmm my impression is that the wording “proof of work” implies that the computation is meaningless and done only to prove that it was done, which doesn't seem the case for BOINC etc.
Desktop machines use around 25W under full power (Mac mini M2pro running LLM inference)
Laptops use 5W (Mac) to 20W (Lenovo Yoga with discrete Nvidia)
Steam box uses 400W under full load, 70W idle (Ryzen, 4070Ti) but these are rare and off most of the time.
They may be more that DC machines.
But most people run on battery and no fans, that gives them 1W power budget sustained, and a TDP of 5W.
It is useful to design for long battery runtime but it has no ecological impact.
@joepie91 I agree! Some efforts don't go towards the most optimal actions, but sometimes those efforts can be meaningful and impactful too. Everyone is uniquely equipped to do different things.
@vladh Well, isn't part of the "proof of work" with crypto is checking that the ledger is in sync/legit, so it's not meaningless within the system?
However, I'm no crypto currency expert, sadly, as I do want to know how it works (and want it to work), I just think a lot of it is BS and similar to Tulip Mania (https://en.wikipedia.org/wiki/Tulip_mania)
I used to plan data centers for booking.com and some special expert from Gartner or something asked how much CO2 we would save if booking was written in Golang instead of perl.
Booking filled the equivalent of 40 jumbo jets per day with flights at that time.
The combined daily data center energy use was a few hours of flight of one engine of one jet per day.
I told them to go and stop flights to have an impact, they didn't.
Hacking won't help the climate.
Politics can.
Tax billionaires. Ban Bitcoin. Prohibit GenAi. Limit data centers. Tax flight fuel fairly. Ban cars and build public transport. Stop using concrete. Demand heat pumps.
That works.
747 fuel use: https://www.quora.com/How-much-fuel-does-a-Boeing-747-burn-per-second
A 10-hour flight uses about 36,000 gallons including climb, cruise, and landing
135,000 Btu/gallon = 10.45 kWh/l
36000 gallon = 136274.82l = 1424071 kWh
So 4 engines = 142407 kWh,
1 engine = 35601 kWh = 35.6 MWh (or 35.6 MW average power usage)
50.000 data center computers = 10 MW average power usage (including cooling).
https://blog.koehntopp.info/2017/07/19/threads-vs-watts.html
Power consumption of a Dell R630 blade with 2x Intel E5-2690v4, running mprime95 on 1/56 to 56/56 vCores.
https://blog.koehntopp.info/2019/10/05/data-centers-and-energy.html
Datra centers and energy usage (before GenAI, which fucked all of us over)
https://blog.koehntopp.info/2024/07/16/energy.html
Power usage in a household visualized
@isotopp @vladh datacenters are converting electricity to heat. 100%. And are investing even more energy to get rid of the heat.
We need to convert heating of buildings from fossil fuel to electricity.
What, if we combine this two issues: a fridge sized blade center, running at 5kw, selling compute power for cloud-edge-compute, providing local heating/hot water energy. Maybe combined with a heat pump. Would that make any sense?
No.
There is a long answer, but it boils down to
- this has been tried MANY TIMES
- household bandwidth sucks
- if household bandwidth didn't suck, latency still matters. That is bad, because bandwidth = engineering problem, latency = physics problem.
https://www.theregister.com/2023/01/12/heata_offers_free_hot_water/,
and many times before.
""We literally put a Bitcoin miner in a barrel of mineral oil and plumbed it up to a radiator," he told The Register.|
In case you weren't believing the bitcoin numbers above.
There are attempts to use data center waste heat for domestic heating, but that is not easy at all.
Data center waste heat is around 50 C at most, often less, so you can use it to drive a heat pump, but you can't transport it very well.
If you transport it, it still has to be used very locally. Data centers are often not built on expensive ground close to where people live, though.
People need heat in winter. Not in summer.
What are you doing in summer?
What are you doing in winter, if the need for this data center happens to be low and it does NOT produce sufficient waste heat?
You just built a tight coupling of one piece of critical infra with another piece of critical infra. This is usually not a winning strategy.
Bitcoin maining computation power consumption is limited by the price of energy.
Reminds me of high-way capacity: the more you have it, the more you have cars driving there.
But with proof-of-work schemed #Bitcoin, if we have abundant (cheap) energy in the future, Bitcoin will consume it.
This depends (or is limited or controlled) by the price of Bitcoin and some anti-Proof-of-Work-cryptocurrency ideology, which drives down the price of Bitcoin with ESG.
ESG whatnot against Bitcoin related industries and financial institutions!
If ethics or ESG guides investing (mutual funds etc) against fossil fuel investment, then, why should ethics or ESG not guide investment, banks, etc. against Bitcoin #mining, which drives up energy prices?
The contribution of Bitcoin for our civilization is higher energy prices and higher inflation! *)
Or, in generalized form: Any cryptocurrency or #blockchain technology, that employs proof-of-work, will drive up the price of its respective proof-of-work commodity.
*) This is a non-quantified causal generalization and its actual degree and contribution for material-physical reality should be quantified to be concrete, meaningful, and applicable in practice.
"Here in Scotland we can already produce 140% of electricity by renewables"
Schleswig-Holstein, where I was born, similarly. Wind + Solar = literally energy too cheap to meter.
The Netherlands, where I live, will be overprovisioned 2x or more by 2030 (that is around 21 GW of max power demand vs. > 21 GW of solar AND > 21 GW of wind).
The next game is batteries for households and vehicle-to-grid in the 5-11 kW range (most existing cars taht do this do 2.2-3 kW)
"Why not make electricity free like water, ie included in council tax."
Water is metered where I live, but yes.
Flatrates for power (You pay a base rate, or tax, it does not matter much) for the first 5 MWh/year are totally a thing that will be coming.
The money is not for the energy, which is free, but for the reliabilty, which comes from having a grid and flexibility and energy storage in batteries.
@isotopp @ScotInTraining @vladh if it's not insta consumption from productions all the smartness will have to deal with the physics of thermodynamics.
Productions -> transportation -> consumption
VS
Production -> transportation -> storage -> consumption
Storage has a cost, right? and it's not very effective (is even 20% stored currently?)
Also how do you do high voltage for stuff like cars, which asteroid do you mine for copper exactly to cable everything everywhere?
Petroleum stays
@isotopp @ScotInTraining @vladh I wouldn't agree that renewable electricity is free. Solar panels and windmills cost money and a not so small environmental impact. They degrade and we'll see how much of them will be recyclable (and how much energy will cost). If people are not generally aware of their impact and consumption when they have to pay, it would be worse if it would be free (we see little increases of awareness when prices increase, I work with this).
Watermanagement is very much NOT privatized in the Netherlands, and the structures that build dikes and manage water are older than any government and exist outside of the government and private industry.
That is because 2/3 of the country are below sea level and without structures for water management, neither government nor private industry would even exist.
Water is still metered (and that makes a lot of sense in many ways matter for NL geography and geology)
Solar panels have a proven (in the wild) livetime of at least 20 years, windmills similarly.
Mine came with a warranty of 10 years, newer models come with 20.
Inverters have a lifetime of 10 years, and mine came with 10 years of warranty.
The limiting component is actually the capacitors in there.
They can be recapped, if you are comfortable with making changes to power electronics (risk is burning down the house).
That said, yes, of course privatized water is a very bad idea (I have lived in Berlin, which privatized and then re-naturalized their water, because neocon shit)
There is currently no professional, regulared recapping service for inverters that offers warranties and liability, but there might well be within the next 10 years.
Current solar cells in accelerated aging models indicate about 40 years of useful lifetime.
@isotopp @vladh I moved from England to Scotland and the difference is night and day.
England genuinely thinks that they get a better service in terms of customer care. Down south there was a leak in the street for about a month before it was dealt with.
Here we had a leak and scottish water were here in 20 mins. In the Highlands. Its 15 mins one way to go and get a pint of milk. Can't fault them.
Irradiation in Amsterdam is 1000 W/qm, at 20% efficiency that's a yield of 200 Wp per qm.
Actual yield is around 1 MWh per year per 1kWp installed (around 5 qm of cells, so 2.5 cells at 400 W).
For 20 years that's a lifetime yield during warranty of 20 MWh per 1 kWp, or 8 MWh per qm.
That looks quite net-positive to me.
Amsterdam is at 52.3N, Edmonton is at 53.5N, Calgary is at 51.05N.
There is about 1:10 in yield between Jan and July.
New York is at 40.7N, about Madrid, and has a 1:5 yield or so over the year (1450 W/qm)
Chicago is 41.8N, Mailand, similarly (1400W/qm)
Los Angeles is 34, more south than Athens and Almeria, about 1:3 yield over the yea (2kw/qm).
Orlando is 28.5N, that's North Africa and no longer Europe. Variation in yield over the year is minimal (2kW/qm).
@isotopp @ScotInTraining @vladh Yep. Some folks have always understood that society exists on terms set by the environment and not the other way around 😁
@martinvermeer @isotopp @vladh I agree. Its certainly like that here in the Highlands. Even now the main toad to Glasgow is shut with a diversion down a single track road and convoy system because of the risk of landslide due to the heavy rain we've had.
The sooner e consider purselves as part of the environment and its not something to be beaten into submission the better