Live data from Hacker News

Principles of Green Software Engineering

principles.green

11–20 of 99 posts

Re: Principles of Green Software Engineering

#12

Earlier quoted context omitted.

I do wonder how many kW of power things that HN generally disparages as bloated (Electron being the main one people talk about) actually adds up to versus more efficient technologies?

Tons, unsurprisingly. There are website energy calculators around.

I've always been skeptical of those. Especially the ones that do things like measure the brightness of the pixels. For the amount of time someone tends to spend on a single page it seems like optimizing just one page is like a water dropper in an ocean. Whereas, say, Visual Studio for instance is on my screen 6+ hours a day.

But maybe my next web app I'll take that into consideration.

Re: Principles of Green Software Engineering

#13
post #3

None of the websites or posts on this topic that I've come across contain any numbers. Would it really make a difference for the average project? Honest question.

https://lowimpact.organicbasics.com/eur

Is an example website that I enjoyed that shows you how much carbon you’re effectively saving by viewing their low impact version for each request.

Re: Principles of Green Software Engineering

#15

It seems most of these boil down to: build more efficient software. Software that is more efficient with the network and CPU is also cheaper to run. So the incentives are generally aligned. When I deploy a system I want it to run on 5 servers not 50 for cost reasons not because I'm being green. If I'm being green by accident, that's a bonus. I'm glad on the "measure" side it gives examples of how to measure (though I…

I do wonder how many kW of power things that HN generally disparages as bloated (Electron being the main one people talk about) actually adds up to versus more efficient technologies?

I think you're firmly into the realm of diminishing returns by the time you're trying to optimize code that runs on a laptop that has a total power draw of 60ish watts.

Frankly - Using my kettle to make coffee twice a day (~15 minutes of runtime) is the same as running my laptop at full power draw for 5 hours.

Just switching a single lightbulb in your house from standard (~100w) to LED (~20w) more than offsets your whole laptop's power usage, assuming you have lights on while working.

Re: Principles of Green Software Engineering

#16

It seems most of these boil down to: build more efficient software. Software that is more efficient with the network and CPU is also cheaper to run. So the incentives are generally aligned. When I deploy a system I want it to run on 5 servers not 50 for cost reasons not because I'm being green. If I'm being green by accident, that's a bonus. I'm glad on the "measure" side it gives examples of how to measure (though I…

I do wonder how many kW of power things that HN generally disparages as bloated (Electron being the main one people talk about) actually adds up to versus more efficient technologies?

My guess is not much.

However, there is also the cost of consumers needing to upgrade hardware when things start getting slow again because of these developer choices.

There’s a figure floating around that if consumers kept their phone for 1 more year, that is the equivalent of taking 100,000s of cars off the road. Not sure how reputable that study was though.

Re: Principles of Green Software Engineering

#17
post #5

It seems hard to achieve most of these goals independent of programming language and framework. At Facebook, the Instagram team has built tooling to inform engineers how many millions of dollars each line of their Python code costs to execute, but the easiest way for them to save those dollars and Joules is to not run back APIs used by billions of people with Python

Until I did a year of Plone development, I always thought webapps were IO bound.

[deleted]

Re: Principles of Green Software Engineering

#18

Earlier quoted context omitted.

That's a good point I didn't think of. And one that I think also applies to a lesser extent to websites. It is certainly possible to build a website that makes Chrome use a lot of CPU and network data. I still think it applies mostly to graphics apps and things like blockchain though. As bad as electron is... would be interesting to measure it with those tools the website lists, though.

Yeah my gut feeling is that Bitcoin alone trounces any waste caused by Electron and badly written webapps, but it'd probably still be worth measuring I think. At the very least it'd be another argument on the side of "let's not use Moore's Law as an excuse for writing inefficient software".

Ran across this earlier today:

https://twitter.com/alexhern/status/1440295741835014149

"Something that stood out: TSMC (with 55% of the global market share, per https://theregister.com/2021/06/01/q1_2021_foundry_revenue_t...) uses 5% of all Taiwan's electricity, which is approx 12TWh/yr. Bitcoin's electricity footprint is… 13 times that, at 164TWh/yr (https://digiconomist.net/bitcoin-energy-consumption)"

Re: Principles of Green Software Engineering

#20

Earlier quoted context omitted.

I do wonder how many kW of power things that HN generally disparages as bloated (Electron being the main one people talk about) actually adds up to versus more efficient technologies?

I think you're firmly into the realm of diminishing returns by the time you're trying to optimize code that runs on a laptop that has a total power draw of 60ish watts. Frankly - Using my kettle to make coffee twice a day (~15 minutes of runtime) is the same as running my laptop at full power draw for 5 hours. Just switching a single lightbulb in your house from standard (~100w) to LED (~20w) more than offsets your w…

The laptop power draw is dynamic depending on what you're doing with it, including how heavy the webpages are. But I agree that heating will generally dominate domestic use.
Post reply on HN