Email or username:

Password:

Forgot your password?
Vlad

I'm trying to start an informal research collective to find ways to reduce the carbon emissions of popular open source software: 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?

The Low Carbon Software Collective is an informal group of programmers who make targeted and measured contributions to open source software in order to reduce global energy usage.
71 comments
max frühschütz – нет войне

@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.

Paul

@vladh I have heard of this project which might be of interest;

codecarbon.io/

Paul

@vladh No problem, very happy to help and keen to see how your project progresses.

Packbats, creative

@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.

priryo

@vladh
Are you aware of the work that KDE are doing on this theme?
eco.kde.org/
@aparrish

Vlad

@priryo Just saw this, thank you, very useful.

Howard Chu @ Symas

@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.

Howard Chu @ Symas

@vladh this looks like a useful gadget for your purpose iotawatt.com/

Logs, dashboards, whatever...

Michael Weigle

@vladh Green Software Foundation is a LSF non-profit that sponsors a lot of research and maintains a list of tooling at github.com/Green-Software-Foun

Greg Wilson

@vladh software engineering research seems to have settled on the terms "sustainable computing" and "green computing" - a search for the former on arxiv.org (arxiv.org/search/advanced?adva) turns up quite a few hits. Much of the journal literature is regrettably paywalled (e.g., doi.org/10.1016/j.jss.2023.111), but most authors will share preprints if emailed.

@vladh software engineering research seems to have settled on the terms "sustainable computing" and "green computing" - a search for the former on arxiv.org (arxiv.org/search/advanced?adva

Evan Hahn

@vladh I don't know, but the folks in the Climate Action Tech Slack might: climateaction.tech/

DansLeRuSH ᴱᶰ

@vladh Very nice initiative, looking forward to it ! 🖖🤓

Vlad

@thibaultmol Amazing, thanks so much for all these links! :)

Kira, feral fox 🦊 🏳️‍⚧️

@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.

alcinnz

@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...

wizzwizz4

@alcinnz @vladh I think "embodied energy swamps everything else" is probably true, but how can we be sure?

I'm sure this is answered in the literature, so, follow-up: Is this necessarily true, or are our current manufacturing processes unnecessarily wasteful?

alcinnz

@wizzwizz4 Its pretty much the only point I see everyone agreeing on regarding energy-efficient computing!

I particularly like solar.lowtechmagazine.com/2009 , & 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!

@vladh

@wizzwizz4 Its pretty much the only point I see everyone agreeing on regarding energy-efficient computing!

I particularly like solar.lowtechmagazine.com/2009 , & 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!

Kevin P. Fleming

@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!

wissotsky

@vladh You can run the software inside qemu and count instructions for highly comparable results.

But I think the already suggested holistic benchmarks are pretty good and likely more practical.

The problem of differences between hardware/environments(e.g room temps/ power supply efficiency) can be mitigated with an automatic benchmark that you can run as a reference point for your own hardware.

For me the idea seems to correlate with performance work in general.

Tane Piper ⁂

@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.

Devine Lu Linvega

@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.
wattwise.games

Forest

@vladh Probably anything you can do to help people avoid buying a new computer would have much more impact than changes focused on reducing the CPU consumption of software

Tim Kellogg

@vladh check out CodeCarbon. it’s a python library for tracking carbon usage. might be worth talking to them codecarbon.io/

Kris

@vladh

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.

Vlad

@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.

Kris

@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

datacenterdynamics.com/en/news

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.

eia.gov/todayinenergy/detail.p

So 110 TWh/460 TWh = 23.9%, almost a quarter of all DC energy use, for Bitcoin alone.

@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

datacenterdynamics.com/en/news

Kris

@vladh

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.

hpcwire.com/2024/07/08/generat

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.

Kris

@vladh

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.

Mac M2pro LLM'ing, then going to normal.

Moving 1d average power is what counts for thermals and consumption, max 15W, then dropping to a 5-7W average for normal dev.
Gaming machine (desktop, Ryzen, 4070Ti)

Idle 100-ish Watt, peak in ESO 250W, peak in Horizon: Forbidden West: 400W (not shown)
An old server, i7-3770 (from 2012), 4 Seagate Ironwolf, 2 Samsung EVO 860, 32 GB RAM

Uses around 75W average power after optimization (100W before).

To be replaced with a Ryzen box from 2024, will use around 1/2 to 1/3 this power by then.
Kris

@vladh

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.

Kris

@vladh

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.

Kris

@vladh

747 fuel use: quora.com/How-much-fuel-does-a

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).

@vladh

747 fuel use: quora.com/How-much-fuel-does-a

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)

Kris

@vladh

blog.koehntopp.info/2017/07/19

Power consumption of a Dell R630 blade with 2x Intel E5-2690v4, running mprime95 on 1/56 to 56/56 vCores.

blog.koehntopp.info/2019/10/05
Datra centers and energy usage (before GenAI, which fucked all of us over)

blog.koehntopp.info/2024/07/16
Power usage in a household visualized

@vladh

blog.koehntopp.info/2017/07/19

Power consumption of a Dell R630 blade with 2x Intel E5-2690v4, running mprime95 on 1/56 to 56/56 vCores.

blog.koehntopp.info/2019/10/05
Datra centers and energy usage (before GenAI, which fucked all of us over)

Reinald Kirchner

@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?

Kris replied to Reinald

@Reinald @vladh

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.

theregister.com/2023/01/12/hea,

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.

@Reinald @vladh

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.

theregister.com/2023/01/12/hea,

Kris replied to Kris

@Reinald @vladh

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.

Kris replied to Kris

@Reinald @vladh

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.

Tobias Denkinger replied to Reinald

@Reinald
Newly built data centers are sometimes used for district heating.
@isotopp @vladh

Kris replied to Tobias

@denki @Reinald @vladh

Correct, and to some limited amount it even works.

It completely does not scale and it is impossible to retrofit (you can, but tearing down the DC and rebuilding elsewhere, close to where people live, will still be cheaper)

Vlad

@isotopp By the way, I think you’re totally right that politics is most important here, I’m just trying to gather enough data before I rule out the impact of software changes. Sometimes progress can be made by going for smaller scale goals too.

Simon readyandnot

@vladh @isotopp A colleague of mine is writing this thesis on that exact question. I'll ask him in the coming days if he has something to share.

A

@isotopp @vladh not sure you can ban cars in the rural setting. Ultimately maybe self driving trams are the answer but that will take decades

However I agree we need to change behaviours. Here in Scotland we can already produce 140% of electricity by renewables

Why not make electricity free like water, ie included in council tax. Immediately electric heaters and immersion heaters would be used preferentially over fossil fuels. Electric cars would be much more attractive

We need big changes

Kris

@ScotInTraining @vladh

amazon.de/-/en/Peter-Norton-eb
Read this on self-driving anything.

You can start by banning cars within city limits (use a P+R, then use public transport), and then extend from there as your public transport evolves.

Making cars impossible to use conveniently outside of cities and banning them in cities is an excellent start.

A

@isotopp @vladh as a start but we have houses (small holdings, farms etc) miles up gravel tracks. People will need some form of transport and public transport would need to be door to door to replace that.

Having also lived in cities I do agree we don't need cars in cities. Good infrastructure would be so easy to put in without cars. We do also need better delivery services moving stuff about is a big use of cars.

Kris

@ScotInTraining @vladh

"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)

Kris

@ScotInTraining @vladh

"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.

A replied to Kris

@isotopp @vladh privatised water has failed- just look at England, high prices, poor infrastructure and rivers full of sewage.

The thing about having a meter is you don't need to read them. Swap to a flat rate and use meters for leak monitoring and not billing

Kris replied to A

@ScotInTraining @vladh

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)

Kris replied to Kris

@ScotInTraining @vladh

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)

A replied to Kris

@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.

A replied to Kris

@isotopp @vladh I grew up in an area of the UK very like the Netherlands and you are right we need individualised approaches.

However we also need better international cooperation. Countries like Scotland that have ample ability for schemes like Ben Cruachan should be part of a network so that areas such as the Netherlands can use 'scottish" electricity at peak times.

Better resilience all round.

Global problems require global solutions

Kris replied to A

@ScotInTraining @vladh

"such as the Netherlands can use 'scottish" electricity at peak times."

app.electricitymaps.com/zone/N

Electricity maps is very nuclear centric, but the visualization is still useful.

The EU is one grid, and countries regularly export and import energy dynamically. That keeps power prices low across all of the EU.

Even GB is still part of that grid.

https://app.electricitymaps.com/zone/NL
A

@isotopp @vladh I'm not sure batteries in the conventional sense are the answer.

Huge issues with mining the resources, lifespan and recycling.

However there are other options on a bigger scale. Ideas like Ben Cruachan near Oban is in essence a huge battery. Pump after uphill when there is surplus electricity and let it flow downhill when there is high demand. No nasty lithium and its water based so infinitely recyclable with a long lifespan.

Kris replied to A

@ScotInTraining @vladh

They totally are.

Around 5-10 kWh LFP per household that has solar, as a rough estimate the smaller of your daily usage after conversion to heat pumpt and electric car and the average solar yield in March or October.

If you allow grid charging for the battery, double the size to 20 kWh LFP.

zonneplan.nl/thuisbatterij

(And the geography that enables Oban does not scale, otherwise it would win)

A

@isotopp @vladh but I agree tax billionaires and flights should be taxed far more appropriately. And by that I mean stop subsidising and for each litre of fuel to be taxed higher than petrol.

Why not also make public transport free? Make it cheaper and easier than owning a car. We also need more public transport infrastructure. My nearest station is an hours drive and a trip to the city is 2-4 hours quicker by car than train.

Vlad

@isotopp Your experience here is really valuable, thank you. I guess what I’m looking for is CO2 from DC usage vs CO2 from consumer usage. Maybe I can figure this out with the data you provided.

Lorenz (xha)

@vladh hmm, i'd guess that you already know that one, but you could just use a very old x86_64 laptop (12 y/o) or something and mesure the performance of applications on that. maby you can even disable cpu boosting and stuff, that'd give somewhat accurate results.

i think the biggest problem with software these days is that it's simply written in very inefficient, and by design, very energy hungry technology such as electron, react and whatnot. people have to buy new hardware every few years to run new software, which is bad for both user experience and obviously creates a lot of carbon emissions too for new hardware.

i think that the best that we can do is improve actually good native tech like gtk or qt or create new ones so that people can use that to build their apps. these large-scale things such as fixing microsoft defender (which is still largely a piece of shit and energy hungry like nothing i've ever seen) are only really possible by big tech companies.

if you want to mesure software, for a badge or something, that is going to be damn hard to do right. but not impossible, i think you could use stuff like getrusage(2) which gives back the time used by the process and some other very useful counters. maby linux has some more fancy stuff for that, but i am on openbsd and that works perfectly fine here.

@vladh hmm, i'd guess that you already know that one, but you could just use a very old x86_64 laptop (12 y/o) or something and mesure the performance of applications on that. maby you can even disable cpu boosting and stuff, that'd give somewhat accurate results.

i think the biggest problem with software these days is that it's simply written in very inefficient, and by design, very energy hungry technology such as electron, react and whatnot. people have to buy new hardware every few years to run...

Nafeon the Beaw

@vladh KDE as a whole has such a offensive and has info about it.

Edit: I've seen you have linked it at the bottom of the page.

Dek 👨‍🚀🐧🚀 (

@vladh
At my university there is a research group dedicated at something very much related: software and sustainability: s2group.cs.vu.nl/pages/about/
Maybe you can find some of their research or software useful?

Go Up