106 points · by luismirandacruz · 5y ago · 71 comments
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.
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.
Yet another reason to block all ads and make no exceptions. Advertising itself should probably be banned.
Server side energy consumption is directly measured by how much money it costs to run the servers. The only reason web devs waste client processing power like there is no tomorrow is that it doesn't cost anything.
This may be a net win even if net power usage is the same because client devices are more likely to be battery constrained
https://firefox-source-docs.mozilla.org/performance/tools_po...
and a good description of how power consumption actually happens: https://firefox-source-docs.mozilla.org/performance/power_pr...
A. Pathak, et, al, “Fine- grained power modeling for smartphones using system call tracing,” http://doi.acm.org/10.1145/1966445.1966460
L. Zhang, et, al. “Accurate online power estimation and automatic battery behavior based power model generation for smartphones”
i think that some android platform dev boards also have specialized hardware and that qualcomm has a whole system for measuring baseband energy usage.
Wondering how to do the same for RPi’s?
Or just measure the CPU usage and naively assume that lower CPU usage always means lower power draw.
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 climate disaster is inevitable.
But of course, they will never do that.
We were making electric arc furnace controllers. An electric arc furnace is commonly used to recycle metal. Think of large pencil leads (size of your thigh) stuck through an insulated lid over a large vat of old bicycles, water softeners, bedframes etc - recycled metal. By creating an arc between the three phases of the electrodes and the pile of metal and controlling the current and length of the arc, considerable energy can be transferred to the metal as heat. Pretty efficient.
Out beta test site complained that they'd be running a shift and notice the arc was misbehaving every morning - failing to moderate the arc length properly. Resulting in most of the energy going into the electrodes and eroding them away. What was going on?
By having an engineer sit there on an overnight shift, we discovered that the desktop computer running the algorithm was going into 'power save' mode, stopping the app from responding to inputs and leaving the furnace electrodes stalled.
We estimated that this 30MW furnace wasted as much energy over the week, as 'power save' mode on PCs saved in all of America for a year.
Think about it. It would have been better if Microsoft had never invented Power Save mode. More electricity would have been saved that year.
That's how much industrial power matters, and how little your app matters.
Disagree. Westerners will do literally anything except make any changes to their behavior. You even see it here whenever these threads come up - "why should I do anything while china is emitting X times more than the US".
These companies don't exist in a vacuum. BP aren't pumping up oil and hoping that an evil megacorp will just buy it. People like you and me are driving the demand for products with huge amounts of waste and dirty manufacturing processes.
Sure, for a random web app with 30 users a small increase in efficiency is likely meaningless, but if that improvement is in a server side framework widely deployed on AWS, that has the potential to save tonnes of carbon
These tools can also be used by said megacorps for scheduling. Personally, I would love it if we could hook into an API in aws that says "hey, demand is low right now and we have wind power to spare, do you want to run your nightly CI build now?"
Oil companies like BP and Shell blocked the dissemination of vital scientific research on climate change. They also blocked the development of electric cars, or alternatives in general. [1] Executives in the car industry also hold back the development of high speed rail networks through lobbying.
> Westerners will do literally anything except make any changes to their behavior.
It's hard for the working class to see the full picture when we live in a proprietary, black box -world that only allows a small group of people to become science literate. A society where the propertied class undemocratically charts the direction for science through 'intellectual property' claims, which blocks scientific progress as it commoditizes and removes important feedback loops/learnings from the commons. [2]
I was taught about global warming as a child at school in the 90s. Are we going to keep blaming it on suppression of information for another 30 years?
> They also blocked the development of electric cars, or alternatives in general.
Electric cars don't solve any problems apart from reduce pollution in cities maybe. The change that is required includes not using 2 tonne vehicles to move around everywhere. Electric cars are just another example of people refusing to change their behaviour.
> It's hard for the working class to see the full picture when we live in a proprietary, black box -world that only allows a small group of people to become science literate.
There has never been a better time in history for finding information or becoming scientifically literate. I'm not sure what you're talking about here.
But none of this will help us anyway. Capitalism keeps us divided and divided we will fall. There's simply no way that any large-scale change is going to happen without coordinated, top-down, systematic enforcement from governments. We need to make people realise that we're all in this together. But this isn't how animal brains operate, unfortunately.
Individual behaviour is the weakest of possible pressures on inefficient processes. And as you point out it's a collective action problem - people aren't going to be the only one changing their behavior, that's obviously ineffective, they want a behavior change to be coerced on everyone at the same time so there aren't any free riders.
Largely it's a "yes and" situation; we have to push for everything, because we'll only get a tiny fraction of the changes we ask for.
The framing if it not being a useful contribution to climate change appears to be used to undermine people's confidence that anything can be done about anything.
But we can and are making progress on plastic litter going into oceans and carbon intensity generally. Very slow progress in some cases but still, its not hopeless or impossible.
And yes, generally we should do the most impactful things first, and we generally are. Most of the eco "whataboutism" seems designed to derail rather than illuminate.
https://www.watttime.org/api-documentation/#introduction
There's other local ones too.
When we do clean house (e.g., destroying unneeded services/environments) it's largely based on reducing cost and complexity -- but cost is still a very poor proxy for low carbon.
I really like your "show me wind power to spare" API also.
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 it's like to lack fuel that powers your necessities, but I grew up in the USSR in 1980s and I can tell you it's not good.
https://www.theguardian.com/society/2021/jul/13/almost-40000...
> your stores being empty because there's no fuel for trucks?
https://www.theguardian.com/business/live/2021/sep/29/uk-pet...
OK, OK, this is a cheap shot and nowhere near as bad as it was in the Soviet Union, but the point is that the involvement of government in energy provision is kind of unavoidable and you can suffer supply and delivery crises under any system.
I'm just about old enough to have been a child when the UK utilities were privatized, along with rail, telecomms and everything else. What this means is that instead of having a single state-owned inaccessible monolith providing bad service, you have a single investor-owned private monolith providing bad service and returning profits to investors. (BT Openreach, Railtrack, National Grid Plc).
Even weirder is having foreign state owned companies in a ""competitive"" ""market"", such as DB or EDF.
I don't think nationalization is the solution on its own though, because what's needed is better policy. Nationalizing things into an incompetent state, which we are currently experiencing in the UK, will just make them worse.
This seems like an exaggeration. If anything, compare the current CO2 emissions per capita by country to get a better picture of how things would be in reality: https://i.redd.it/mnt8im0yvvd41.png
It'd probably be a shift in your standard of living, for example when going from the situation in the US (16.5 tonnes of CO2 per capita) to the situation in the UK (5.7 tonnes of CO2 per capita). I wouldn't say that the people in the UK have empty stores, but they definitely have a less rampant disregard for the environment while chasing profit margins.
In practice, if you wanted to be more environmentally friendly, you'd drive a hatchback instead of a SUV or would use public transportation, would live in an apartment building instead of having your own house, would eat meat once a week instead of once a day, would have a new phone and computer every 5 years instead of every year, as well as would do all of the other things that responsible people should do, including exercising your rights within a democratic government. That also seems to be working out great for the Scandinavian countries.
But the most important thing - you'd stop having so many kids and would lower your population density, on the path to which most European countries are already on. On an unrelated note, where i live (Latvia), heating my house is a matter of fetching some firewood and lighting the furnace: that way central heating takes care of making the rooms warm for everyone who lives in the house, while i can also use the furnace for making bread or anything else.
Sources for the visualization:
[0] https://www.reddit.com/r/dataisbeautiful/comments/ew2sn7/per_capita_co2_emissions_by_country_oc/
[1] https://www.icos-cp.eu/science-and-impact/global-carbon-budget/2019
[2] https://data.worldbank.org/indicator/SP.POP.TOTLYou make it sound like you believe this is a good thing while people who are actually experiencing population decline are not having a good time.
Whether it's countries like Japan and Russia desperately trying to encourage births, China lifting its one-child policy, villages in Italy paying people to move there, desolate post-industrial towns in the US rotting, etc - everything points to population decline as a strictly terrible thing.
Like you, I was also born in Latvia. In 1980s, the country had 2.6 million people. Today, something like 1.9 million - 27% decline in 40 years. You may celebrate this from the CO2 point of view but I think the more obvious interpretation of these numbers is "Latvia is dying." It saddens me to see this. I am not sure whether the land will just be empty or it will be populated by people from cultures who have not reduced their children (history suggests the latter) but - are you sure this is what you want?
Also, taken to the extreme, your logic suggests not just reducing kids, but mass suicide/homicide. After all, if we care about CO2 above all else, why wait a generation for the number of "emitters" to decline, when we can just solve the problem today?
None of this is to say that reducing emissions isn't important and there are a ton of great ways to do that (new energy sources, reduced commuting through better and better communication tools) coming on-line that I am really excited about. But destroying future generations to move this metric doesn't seem right to me.
If these are disqualifying, capitalism's out too.
Heat: https://en.wikipedia.org/wiki/2021_Texas_power_crisis
Empty stores via fuel shortage: https://www.cnn.com/2021/09/28/business/brexit-fuel-food-sho...
But yeah, fretting about energy efficiency on the margins is a waste of time and cognitive effort. The world economy and travel largely shut down last year and it barely made a dent in global emissions.
Our choice is rapidly decarbonize energy production and figure out carbon capture or bust.
If you want a model of a country with falling emissions, look at Japan, which is actually dropping in population without merely outsourcing reproduction. The western model will never cause emissions to drop, because the point isn't to cause emissions to drop, the point is to maximize gdp growth and standard of living in the medium term, which is a goal that all but guarantees emissions growth. Get ahead now because if we don't, somebody else will, and then we'll be behind when global warming does everybody in!
Yeah, and it's also the fastest way to put an end to your nation. Without people, there's no nation.
>nationalize and seize energy corporations and whip them into shape under planned economic management
Genuinely asking, do you think this is an option anyone has? I firmly believe that over 50% of the country could want to do this and it STILL wouldn't be done.
The crisis likely will be eventually addressed, but it will be by the successors of liberal democracy, and the multipolar world consisting of the post-capitalist, post-US-hegemony third world.
I was born and lived in the USSR. Since everything was state-owned and natural resources were allocated, not bought and sold and taxed, there was no incentive to use them efficiently. The result was horrible pollution everywhere, the like we see in modern-day China.
The famous commie blocks, for example, had no insulation nor ventilation to speak of. Instead, everyone were expected to keep a small window[1] open (even in winter) to ventilate, and the tremendous heat loss was compensated by 30-50% higher fuel consumption. Since it didn't have a price tag, wastage wasn't an issue. You couldn't save money by insulationg your home, because heating prices were artificial and unrelated to consumption. No-one else in the chain had any incentive to improve anything either, because that wouldn't have improved profit margins or anything else of that sort. Their wages were also fixed and unrelated to performance.
Eventually this led to environmental revolt, which was one of the drivers of USSR's collapse. Chernobyl and its coverup played a vital part in general disillusionment. The country was turning into an industrial wasteland before everyone's eyes.
Go ahead, do the same. Give Exxon oil fields for free, force people to work for them at artificial and undervalued wages[2], abolish pollution and all other taxes, close all competing oil companies[3], and jail every critic of your plan[4]. Surely that will work.
[1] https://en.wikipedia.org/wiki/Fortochka
[2] It was a crime to be unemployed. People were assigned to jobs when they finished school. https://en.wikipedia.org/wiki/Parasitism_(social_offense)
[3] Motherland needs only one.
[4] They must be insane to doubt you. Lock them up in a mental hospital. https://en.wikipedia.org/wiki/Political_abuse_of_psychiatry_...
If programmers have the tools to easily profile and fix low-hanging fruit in this area it’s a positive to society.
What is your aim for the energy sector here?
To decarbonise it requires a lot of capital investment and innovation and it's only pragmatic to involve the private sector through the right incentives (both carrot and stick). It's also pragmatic to involve the state because private companies are not very good at projects that require high capital investments for very long term goals (for example, developing and building nuclear plants).
But I don't see the need to poo-poo this. Think of a complex multifaceted problem as a 2x2 square, where one axis is difficulty and the other axis is impact. I think it's very reasonable to defend a strategy that tackles high difficulty high impact problems + low difficulty problems regardless of impact, just because it creates a steady cadence of incremental wins, which are energizing.
I agree that most of the resistance is financed by powerful corporates who don't want to be regulated and nationalisation is one way to cut that Gordian knot, but not the only one.
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.
Perhaps you can find a better way than venting your frustrations in an echo chamber.
The only big example is China that puts resources in innovating their way into a carbon neutral economy in 2060 and making sure they peak at around 2030. That because the Chinese citizens demand a better environment and blue skies and their governments actually listens and creates plans.