DEV Community

Cover image for Climate-friendly software: don't fight the wrong battle

Climate-friendly software: don't fight the wrong battle

Thomas Broyer on May 01, 2023

When talking about software ecodesign, green IT, climate-friendly software, the carbon footprint of software, or however you name it, most of the t...
Collapse
 
bezpowell profile image
BezPowell

Hi Thomas. I really enjoyed reading this, a very good article and nicely highlights that there is more to think about than purely efficiency when it comes to reducing carbon emissions. I can be guilty of spending too long trying to make things fast, and perhaps should be spending more time on areas that will have a bigger impact.

One thing I will say, however, is that we need to be careful about saying that concentrating on energy efficiency is misguided, just in case that becomes ammunition for green washing. At the end of the day, software that works well on low-powered devices has to be efficient and, to help users prolong their devices for as long as possible, we need to invest the time to make our software as performant and as light of resource usage as possible. Overall, spending an hour to move your server to a region with a better electricity balance might make a bigger impact than spending that hour shaving a few kilobytes from the size of your app, but both do need to be done; we don't want companies using green electricity as a excuse to not make further changes when their software is bloated and inefficient.

Collapse
 
tbroyer profile image
Thomas Broyer

Thanks for your comment.

The note about "concentrating on energy efficiency is misguided" (your words) in the introduction is about server-side energy efficiency. Of course you do have to make your client side (web app, native app) energy efficient:

As part of performance testing, have a look at electricity use, as it will both be directly associated with emissions to produce that electricity, and be perceptible by the user (battery drain).
[…]

Optimize for the perceived performance and battery life.

Could it be the word “first” in the “Pick servers in carbon-neutral or low-carbon datacenters first, then optimize your architecture and code” pullout that made you think I was kind of dismissing the rest? Maybe I should rephrase that… My point rather was: if you care, start by doing that; there's no point investing time in all the rest when you have that relatively easily attainable low-hanging fruit, so that should probably be your first action.

Collapse
 
bezpowell profile image
BezPowell

I was probably misreading the "most of the time people focus on energy efficiency and server-side code" as being two separate items, rather than energy efficiency of server side code. Sorry if I came across as picking holes in your arguments, not my intention at all; I really enjoyed the article and it has given me lots to think about.

I've seen a few pieces recently that claimed that there was little point in optimizing code when moving it to a different location would make a bigger difference and, while I didn't think you were advocating for such a thing, think we have to very careful in what we're saying. We really need to do everything we can if we are to halt the worst effects of climate change, but your policy of picking the battles were you can make the biggest difference is a very sensible one. As you say, there's not point spending all your resources on small gains when the same amount of effort could make a big difference if used elsewhere.

I've found the whole idea of optimising bandwidth not making much of a difference hard to get my head around, but am very glad people like yourself are raising awareness about it! Most of my efforts to date have been around shrinking bandwidth usage, but I am seeing now that there are perhaps other areas where I should be focusing my attention.

Thread Thread
 
tbroyer profile image
Thomas Broyer • Edited

Actually, I had thought about writing “energy efficiency and/of server-side code” but found it harder to read; the idea was to convey “energy efficiency of server-side code, and server-side code” (for the other things like optimizing for speed). I went for the simpler wording as this was just the introduction and I would touch about energy efficiency later on anyway 🤷

Wrt network usage: it does have an impact, but (to my knowledge) more on the client device than on the network infrastructure. A bigger impact probably of not containing our usage of the network is to push it too far so bigger infrastructure has to be deployed.