Live data from Hacker News

Principles of Green Software Engineering

principles.green

41–50 of 99 posts

Re: Principles of Green Software Engineering

#41
post #33

Earlier quoted context omitted.

I think there's something missing here. In how we operate applications. It's not unusual to run an application on a server where that server is using only 25% of its resources (e.g., ram and/or cpu). Then, there are many different servers running many applications all of which are under utilized. There are more efficient ways to operate these applications that drive up power efficiency. Google brags about the power e…

Most companies don't have control over their data centers (except to maybe use energy efficiency as a selection criteria). But you have a point about CPU. But regarding incentive alignment, making those data centers more efficient is not just more green but also saves the companies a boatload of money. Since cloud providers don't charge extra for your utilization percentage I've always told my teams: if the CPU is ru…

A lot of companies still have control their data centers or some portion of them. At least to an extent to control how things are scheduled on hardware.

Kubernetes is similar enough to Borg (the datacenter/cluster OS that Google uses) to efficiently schedule workloads over a cluster. There are ways to use it anyplace one has a cluster for that purpose. This is just to provide an example.

Re: Principles of Green Software Engineering

#42

Earlier quoted context omitted.

How many laptops does it run on all day, and does anyone run it on desktops instead?

Even a desktop only runs about 100w unless you're doing something like gaming. Admittedly, a desktop guarantees you're using another screen, so tack on 60w for the external monitor. You'd still be better off turning off the lights in a single room, in most cases, or simply toggling the AC up literally 1 to 2 degrees.

If I remember correctly, my desktop runs at ~20W idle (went down to 15W before I added two extra memory modules) and ~70W fully loaded. That's a 50W delta per eight cores, so around 7W per fully loaded core.

Re: Principles of Green Software Engineering

#43
post #25

I wonder if this might be penny wise and pound foolish. Hypothetically, if it takes even a single week longer to make code much more efficient and only 20% of that workforce is driving to work, making coffee, running their laptops, etc, do you come out ahead?

Unless we have systemic change (e.g., border adjusted carbon tax), anything we try to do as individuals is going to be penny wise and pound foolish. Most of our carbon footprint comes from industry (including transporting goods). Much of that presumably comes from our trade with China both in terms of their lax pollution laws and then transporting goods across the Pacific. None of that is going to change unless we st…

Not buying stuff you don't need and the like are measures and individual can take that don't have hidden carbon downsides.

Re: Principles of Green Software Engineering

#44
Instead of micromanaging performance and energy usage; use data centers that use clean energy. It's dirty energy that we need to stop using. Clean energy, we should feel less constrained about (without wasting it obviously). Long term when we have a surplus, it shouldn't matter how much we use. Short term, increased demand actually grows the renewable supply mostly because that is the cheapest way to meet that demand. The more renewables, the less economical non renewable becomes. So, not all energy usage is bad.

Most of the big cloud providers already are implementing agendas to become sustainable:

- https://sustainability.aboutamazon.com/environment/the-cloud... AWS is planning to be carbon neutral by 2025

- https://cloud.google.com/sustainability, Google claims to be carbon neutral now but are also planning to switch to 100% renewable energy by 2030. I guess they are planting trees or something.

- https://azure.microsoft.com/en-us/global-infrastructure/sust... Azure is planning to using 100% renewable energy by 2025

Otherwise, maybe optimize your cost with cloud usage and indirectly save some energy. If you don't need it and it's running, it's costing you and the planet something. So, win win if you fix that. Also, as MS helpfully suggests, on premise is way more inefficient than their solution. While that is somewhat self serving, it's also probably true. If you us on premise, maybe consider picking your energy supplier more carefully.

I guess, in the future, having strong guarantees from suppliers about sustainability could potentially mean advertising your own sustainability. Few companies do this right now. But it's potentially a big deal when your customers start appreciating, or better, demanding that you run your business sustainably. Right now, few companies care about this. It's a mindset change that needs to happen.

Re: Principles of Green Software Engineering

#45

My mom keeps bothering me to turn off the light before I leave home while any of the Youtube video she watch costs as much energy as keeping my light on for days/months. If only people were more aware of the energy cost of Internet.

Now I feel really old, but your mom probably remembers time when a bright lightbulb would consume twice as much energy as a modern laptop (which was like 10-15 years ago)

Re: Principles of Green Software Engineering

#46
post #41

Earlier quoted context omitted.

Most companies don't have control over their data centers (except to maybe use energy efficiency as a selection criteria). But you have a point about CPU. But regarding incentive alignment, making those data centers more efficient is not just more green but also saves the companies a boatload of money. Since cloud providers don't charge extra for your utilization percentage I've always told my teams: if the CPU is ru…

A lot of companies still have control their data centers or some portion of them. At least to an extent to control how things are scheduled on hardware. Kubernetes is similar enough to Borg (the datacenter/cluster OS that Google uses) to efficiently schedule workloads over a cluster. There are ways to use it anyplace one has a cluster for that purpose. This is just to provide an example.

I agree, you can architect your system to make better use of hardware for sure.

What I meant was: I can't tell AWS to make more efficient power switching or design an ASIC that is lower power. Best I can do is say that if they don't I'll move to another provider.

It's been a long time since I've worked with a company with any significant number of physical racks they rent/own where they can put their own hardware on them. Though, I admit, I may be suffering bias here and it could be they are more common and I just happen to work with companies that are cloud based.

Edit: I used to work for Lycos in the mid 2000s and we were just starting to do that (run our workload on VMs instead of metal so we could make all the servers multi-tenant. That was the last time I've worked with a physical server and the Lycos network (across all their sites) was the equivalent of a top 50 website at the time.

Re: Principles of Green Software Engineering

#48
post #35

My mom keeps bothering me to turn off the light before I leave home while any of the Youtube video she watch costs as much energy as keeping my light on for days/months. If only people were more aware of the energy cost of Internet.

Correct me if I am wrong, but I think saving energy is the wrong overall way to go. Better is to be 100% renewable (or otherwise "green") when generating energy, so that consumption ceases to be an issue.

The right thing is to do both, because we don't have time to relax and wait for the grid to be 100% renewable. Using less energy means we can convert the grid more quickly.

Re: Principles of Green Software Engineering

#49

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 could end up in a quagmire of trying to calculate all the secondary effects of different production strategies. Maybe another GUI framework uses less power, but maybe it takes more developer hours. How much power do those workstations consume? And their offices or home offices? Or the power consumed by hosted services they use? What about the power to heat their coffee? What country are the developers in and how is their power sourced? Is a kWh of Chinese coal comparable to a kWh of US natural gas?

I don’t think a commissar can correctly compute costs of design and implementation alternatives, and I think permitting an open market and letting prices sort this out is a more viable option.

Re: Principles of Green Software Engineering

#50

Instead of micromanaging performance and energy usage; use data centers that use clean energy. It's dirty energy that we need to stop using. Clean energy, we should feel less constrained about (without wasting it obviously). Long term when we have a surplus, it shouldn't matter how much we use. Short term, increased demand actually grows the renewable supply mostly because that is the cheapest way to meet that demand…

There is no such thing as "clean energy". Energy always entails environmental impact. As an example, a wind turbine has large environment impact:

* During its production: mining to get the metals, heavy metal work like making steel, cement, resins, etc. Digging large mines, driving trucks all around with heavy materials

* During its operations: noise, visual pollution, often destroying wildlife sites as people don't want them close to their living areas

* After its operations: mostly unrecyclable, composite materials like resins, cement; often burried/landfilled

> Google claims to be carbon neutral now but are also planning to switch to 100% renewable energy by 2030. I guess they are planting trees or something.

I think this is a good representation of what the common person think. "They must be dealing with the pollution issues, right? Trees, hydrogen, electric cars, it's all going to be ok, right?".

Start looking up data on this topic, and prepare for a deep dive into how no-one is actually doing anything significant about it, while calling everything green. No-one is "carbon neutral". It's complete marketing / green-washing. Google footprint on our ecosystem is large.

Post reply on HN