Live data from Hacker News

Tools to measure software energy consumption from your computer

luiscruz.github.io

21–30 of 72 posts

Re: Tools to measure software energy consumption from your computer

#21

Westerners really will do literally anything about climate change except reckon with their corporate overlords who by far are the biggest contributors to climate destruction. Get real, your app using 15% less power makes literally zero difference. If you want to make a real difference, nationalize and seize energy corporations and whip them into shape under planned economic management. Anything short of that and clim…

>> nationalize and seize energy corporations and whip them into shape under planned economic management. Can you imagine not being able to heat your apartment/home, or your stores being empty because there's no fuel for trucks? Unless you can really picture that and still tell yourself "yup, I really do want that," you shouldn't be excited/confident about what you're proposing. I suspect you can't really imagine what…

Oh yeah, and having a union for workers automatically means the country has gone communist. /s

Re: Tools to measure software energy consumption from your computer

#22

Westerners really will do literally anything about climate change except reckon with their corporate overlords who by far are the biggest contributors to climate destruction. Get real, your app using 15% less power makes literally zero difference. If you want to make a real difference, nationalize and seize energy corporations and whip them into shape under planned economic management. Anything short of that and clim…

are easterners doing something different?

Not telling everyone else what they should do (while not following their own advice), at least for now.

Re: Tools to measure software energy consumption from your computer

#23
post #9
post #5

All these software depend on proprietary interfaces (Intel RAPL (oldest), Nvidia, Android..) Wondering how to do the same for RPi’s?

There are no standard interfaces for power measurement. Given the cost-cutting philosophy behind RPi I assume the relevant sensors simply aren't there.

Maybe we could use software for emulating such sensors.

Re: Tools to measure software energy consumption from your computer

#24
post #19

Westerners really will do literally anything about climate change except reckon with their corporate overlords who by far are the biggest contributors to climate destruction. Get real, your app using 15% less power makes literally zero difference. If you want to make a real difference, nationalize and seize energy corporations and whip them into shape under planned economic management. Anything short of that and clim…

What are energy companies doing that's worth nationalizing them over? Whip into shape how? They're energy providers, not users.

They are still investing into fossil fuels instead of sustainable production methods.

Re: Tools to measure software energy consumption from your computer

#25
post #5

All these software depend on proprietary interfaces (Intel RAPL (oldest), Nvidia, Android..) Wondering how to do the same for RPi’s?

For starters you could always measure the power consumption that the Pi pulls from the USB power supply. As long as you don't change many variables when comparing software (like plugging in additional peripherals) it should be a decent way to get an idea of the power draw of the whole system under different circumstances.

Or just measure the CPU usage and naively assume that lower CPU usage always means lower power draw.

Re: Tools to measure software energy consumption from your computer

#26

Westerners really will do literally anything about climate change except reckon with their corporate overlords who by far are the biggest contributors to climate destruction. Get real, your app using 15% less power makes literally zero difference. If you want to make a real difference, nationalize and seize energy corporations and whip them into shape under planned economic management. Anything short of that and clim…

> Get real, your app using 15% less power makes literally zero difference.

Unless this is flamebait, it is wrong. I see this argument in countless different incantations. Sure, our 'corporate overlords' in all compass directions play an oversized role in compounding our problems, and we should go all-in to force them to improve their ways. In addition to that all our small collective actions matter just as well. They compound too. If you want to tackle wicked problems, there's no single one solution and a multi-pronged approach is needed.

Re: Tools to measure software energy consumption from your computer

#27
These tools are great, but aren't enough to get a full picture, and not accurate enough to give actionable insights.

Most of the quoted tools measure the CPU or GPU consumption. But in a laptop, about half of the energy consumption comes from the screen. And the consumption computers & smartphones represents only 20% of the CO2 emitted by digital activities - the vast majority lies elsewhere, in networks, in datacenters, or in the factories manufacturing the devices. So the tools of this article give an idea of only 10% of the digital energy consumption (source: https://theshiftproject.org/en/article/lean-ict-our-new-repo...)

Besides, measuring the consumption of computer doesn't isolate the contribution of one program, and / or doesn't provide enough granularity to help developers understand what to optimize first. If you have ever tried to use one of these to reduce the actual consumption of a software, you've probably hit a wall. Isolation, reproducibility and granularity aren't yet enough to make these tools suitable for software engineers.

Worse, focusing on the computer consumption may push web developers to just move computations to the server side, where the energy consumption is not measured. This will lead to an apparent drop on the client-side consumption, but does the overall system footprint decreases?

One solution is to use docker to isolate processes, docker-compose to reproduce the client, network and server in a lab, docker stats to get system metrics, and academic papers to turn these metrics (CPU, network and disk I/O, memory) into Watt.hours or Joules. It works in theory, but in practice it requires a lot of engineering to get a good reproducibility and accuracy.

I've spend a year and a half on this subject, and the results of these efforts can be tested at GreenFrame.io. Many web developers already use it in their CI to monitor and reduce their energy emissions.

Re: Tools to measure software energy consumption from your computer

#28
This made me think: On a smaller scale, should code that uses more efficient algorithms and data structure in terms of computational complexity (both time and space) also be more efficient in terms of energy usage? If the code in its most frequent use cases uses less instructions and memory swaps, wouldn't that lead to less energy usage?

Re: Tools to measure software energy consumption from your computer

#29

These tools are great, but aren't enough to get a full picture, and not accurate enough to give actionable insights. Most of the quoted tools measure the CPU or GPU consumption. But in a laptop, about half of the energy consumption comes from the screen. And the consumption computers & smartphones represents only 20% of the CO2 emitted by digital activities - the vast majority lies elsewhere, in networks, in datacent…

> Worse, focusing on the computer consumption may push web developers to just move computations to the server side, where the energy consumption is not measured. This will lead to an apparent drop on the client-side consumption, but does the overall system footprint decreases?

This may be a net win even if net power usage is the same because client devices are more likely to be battery constrained

Re: Tools to measure software energy consumption from your computer

#30

These tools are great, but aren't enough to get a full picture, and not accurate enough to give actionable insights. Most of the quoted tools measure the CPU or GPU consumption. But in a laptop, about half of the energy consumption comes from the screen. And the consumption computers & smartphones represents only 20% of the CO2 emitted by digital activities - the vast majority lies elsewhere, in networks, in datacent…

> Worse, focusing on the computer consumption may push web developers to just move computations to the server side, where the energy consumption is not measured.

HALLELUJAH! It sure is measured. If web developers where a fraction of as wasteful with server resources as they are with client resources the world would instantly be measurably better for it.

I'd bet that a significant portion of the energy and waste from computers are from viewing ads. And the only reason it exists is because those responsible don't pay for it. Suddenly, they would need far more servers. Which costs money, incentivizing them to be resourceful.

Seriously, because of the web the absolute vast majority of devices with a battery that touches javascript will have to be thrown away at least a year before its time due to battery degrading and CPU not keeping up with the bloated web.

Post reply on HN