BT

Facilitating the spread of knowledge and innovation in professional software development

Contribute

Topics

Choose your language

InfoQ Homepage Podcasts Microsoft's Asim Hussain on Designing Software for Sustainability and the Green Software Foundation

Microsoft's Asim Hussain on Designing Software for Sustainability and the Green Software Foundation

Bookmarks

Sustainable Software Engineering is an emerging discipline at the intersection of climate science, software, hardware, electricity markets, and data center design. In the most recent InfoQ Trends Report on architecture, the InfoQ team added designing for sustainability for the first time, suggesting that it's emerging because people are realizing that the software industry is responsible for a level of carbon usage comparable to that of the aviation industry. The question then is what can we do as individual developers and architects, if anything, and what role does the broader shift to the Cloud have?  Charles Humble explores the topic with Microsoft's Asim Hussain, green cloud advocacy lead and chair of the Green Software Foundation. They discuss techniques such as demand shifting, as well as the current challenges that the Green Software Foundation is aiming to address.

Key Takeaways

  • Green cloud is about how cloud providers can build services that emit the least carbon possible per unit of work. Microsoft focuses on four pillars - carbon footprint, ecosystem, waste and water use. 
  • There are, however, also things that individual developers can do. One is demand shifting, which involves moving your workload either to a different region or time to make use of cleaner electricity. 
  • Demand shifting has the side effect of increasing demand for renewable energy - effectively incentivising energy companies to meet renewable demand. It also acts rather like a battery - providing a notional mechanism of storage for renewable energy.
  • Developers should also focus on making hardware last longer - embodied carbon, the carbon that is used to make a piece of hardware in the first place - is typically more than that used by the hardware in its lifetime. So how can we make hardware last longer?
  • A major challenge for developers who want to write software in a carbon-aware way is that there is very limited data currently available. Trying to change this is one of the central goals of the Green Software Foundation.

Transcript

Introduction [00:13]

Charles Humble: In the most recent InfoQ Trends Report on architecture, the InfoQ team added designing for sustainability for the first time suggesting that it's emerging because people are realizing that the software industry is responsible for a level of carbon usage comparable to that of the aviation industry. The question then is what can we do as individual developers and architects, if anything and what role does the broader shift to the Cloud have? And that's the subject of the podcast today.I'm Charles Humble one of the co-hosts of the show, an editor in chief for Cloud Native Consultancy Firm Container Solutions. Before we get into the podcast itself, I just have time to let you know that our online software development conference QCon Plus is back this November, the 1st to 12th. You can expect curated learnings on topics that matter right now in software development.

QCon Plus is a practical conference, laser focused on learning from the successes and failures of domain experts at early adopter companies. If you enjoy the conversations we have on this podcast, you'll get a lot out of QCon Plus and to learn more about the conference head to qcon.plus. This week on the podcast, I'm joined by Asim Hussain, Asim is currently the Green Cloud advocacy leader at Microsoft and is the chairperson of the Green Software Foundation. He's created a number of courses on JavaScript and related technologies and is the author of a couple of books, one on machine learning with TensorFlow.js and the other on Angular.

Asim welcome to the InfoQ Podcast.

Asim Hussain: Thank you, Charles. Thank you for having me here today.

What does a Green Cloud Advocacy lead do? [01:42]

Charles Humble: So tell me about your role at Microsoft. What does a Green Cloud Advocacy lead actually do?

Asim Hussain: I think we should put the comma in the right location. So it's a Green , Cloud Advocacy rather than the Green Cloud, Advocacy, which has caused some confusion in the past. Some people thought we had an actual service called Green Cloud and they were trying to search for it in the Azure categories and they couldn't find it and they were like, "Where's your Green Cloud service?" So no it's essentially looking at, well really at the end of the day its software through the lens of sustainability. So advocacy in Microsoft is all about connecting with developer communities all over the world. We've got teams inside the organization that focus on different technologies or there's a Machine Learning Cloud Advocacy team. We've had a reorg right now. So there's a JavaScript Cloud Advocacy team, there's various people. And where the intention is just to be a conduit between that entire community and the Cloud services in Microsoft, both educating, teaching and training the community about how they can do their work better on all of Microsoft Cloud, we're also listen and saying, "Well, what do you need?"

Okay, let's feed that into the product service and make the service more for you. So in terms of Green Cloud Advocacy, it's advocating to on behalf of the growing, the very fast growing community of, we don't really have a great name for them but green software practitioners, people who are technologists who care passionately about sustainability and who think about these questions about, well, how do I do my job? How to do a thing that I spend eight hours a day or 20 hours a day doing, how to do that more sustainably? And that's both trying to help them understand how do you actually build applications or architect applications in the Cloud to be more sustainable but it's also listening, as someone who's trying to do that. What do you need, what features do you need in the platform? What are you asking for? How can we feed that back? How can we represent you? And that's what the Cloud Advocacy division in Microsoft, that's what we focus in on.

What is Green Cloud? [03:41]

Charles Humble: So accepting your point about the placement of the comma and your own job title there. What is Green Cloud? I mean, the energy that powers public Cloud providers, isn't a hundred percent renewable. And depending on which region you're in, it might be not renewable at all. It might be a hundred percent from coal or other dirty energy sources, carbon is being created. So what do we mean when we talk about Green Cloud?

Asim Hussain: I would say it's not a point that you reach a Cloud does not become green. I think it's a direction that you head in constantly. Just how do you build applications in the Cloud and also platform providers itself like Microsoft, how do they build services that emit the least carbon possible per unit of work? And that's really what it's all about. And when we talk about green, actually in terms of green software engineering, that's what we talk about, which is in terms of optimizing for carbon emissions, putting my Microsoft hat on again at Microsoft, when they talk about green and sustainability, they have full all pillars. One is carbon, meeting carbon reduction goals. Also another one and this is one that the data center team and especially from a tech perspective is quite important, it's water data centers are huge consumers of water, portable drinking water.

And how do we make sure that the impact of data centers on the planet, we're still kind of giving human beings, people good access to water essentially. The other two aspects for Microsoft are waste as well. Another aspect for Microsoft looks at it, from a greening up its Cloud perspective is, zero to landfill, is the specific terminology. So zero to landfill by 2030. And there's various things that Microsoft's doing from that perspective. We call them the circularity centers. So basically inside data centers themselves, they're opening up but its actually places where, when a server breaks down, instead of a server going somewhere else, it gets broken down on site. And then those parts are then reused and the intention is that nothing from that server goes to waste. It gets reused or recycled or something along those lines. And the final one that Microsoft has, doesn't particularly relate to the work that we do but it's protecting biodiversity.

And then when you look at other programs, they're completely separate to the work that I do but other programs and Microsoft like the AI for Earth program, which is how can you use technology to protect the biodiversity of the planet and a lot of that's to do with like AI. So, yeah, so those are the four pillars of Microsoft when it comes to sustainability. But generally when we're talking about the work that I do, it's really about how do we build and architect applications so they emit the least carbon possible to our atmosphere? And the main sources of carbon from a Cloud perspective are, what we call the embodied emissions. So this is the emissions from not just the servers but all the hardware aspects of computing and all of that emitted carbon when it was created, all of it will emit carbon when it's been destroyed.

So that's one of the major sources of carbon. Another major source of carbon is electricity or most electricity still created the burning of fossil fuels. So, how do we be more efficient in how we consume electricity? So there's a lot of stuff that happens in the Cloud space around that PUE, toward Power Utilization Effectiveness. I keep on forgetting what the actual PUE terminology is. I probably say it wrong every single time but that's the measure of how efficient a data center is. And energy incoming to energy that actually getting to the servers. And the other one is, we are going to consume electricity. So can we consume that electricity in the most intelligent way possible with positive, beneficial effects on the energy systems so that we all transition to a lower carbon energy future? So it's a whole bunch of different things there but that's broadly what a Green Cloud is.

What are Microsoft’s eight principles of sustainable software and what was the philosophy behind them? [07:20]

Charles Humble: You mentioned Microsoft's four pillars of sustainability, carbon footprint, ecosystem, waste and water. And Microsoft is also published eight principles for sustainable software. These are things like demand shaping, energy proportionality, carbon intensity and so on. I'll link to them in the show notes actually because I reread them when I was preparing this podcast. They are really good still but can you talk about them what they are and the philosophy behind them?

Asim Hussain: Yes, so the reason we created the principles a couple of years ago is because we start to say, look, we want to talk about Green Cloud Advocacy and green software engineering and A, not everybody agreed on what green meant, so that was the first step, is let's get on the same page. And then we realized a lot of the things that you need to know in order to talk about this space are things you're just not taught in a traditional computing environment or a traditional education system here. So it was an intention just to level set the conversation. You can gather this stuff if you're doing your own research, it takes like six months a year, you'll pick it all up. Can we just condense it all into a quick half an hour training? If have a meeting with a bunch of people around sustainable software engineering or green software engineering topics, everybody just read this or watch this because it's now a series of videos.

Watch this, takes half an hour, everyone's level set. The language you're using is the same. We know what we're talking about. And so yeah, so the first principle is all about carbon because the United Nations, it was at 17 sustainable development goals. And there are some people out there that say that when you're talking about the space you say optimize for all 17, it's incredibly hard to get people to optimize for 17. It's incredibly hard to get engineers to optimize for one variable. And that's the variable we're going for. It's all about carbon, whatever you're doing. If what you're doing, if the choice that you're making reduces carbon emissions, that's the right direction you should be going in. So we just point you in the right direction. The second Principle was all about electricity. It was a surprise for me when I first going into the space, I had no idea, no understanding about electricity, to understand what a major source of the carbon emissions it is in the world right now.

It was a real shocker for me but it also is a huge opportunity because as somebody in this space, we know the stuff we create consumes electricity, which means that you can have an impact- because if you can use less electricity. The third one was carbon intensity as you touched on there as well, which is I think it's a really interesting topic because you have to understand how the electricity system works but essentially there is a measure of how clean or dirty your electricity is. It's called carbon intensity. It's a grams of carbon that is emitted into atmosphere per kilowatt hour. And it varies. And that's what's interesting. It varies by region because different regions have different things that create electricity. Some things burn a lot of coal to create it. Some things spin really fast when it's windy to create it and so that means the electricity in different regions is cleaner or dirtier but it also very interestingly varies over time as well.

One of the things about the classic electricity system, the way it's premised historically has been the battery for our electricity system. We didn't need batteries because our battery was coal. We had this existing chemical battery. And so we didn't need to build any storage because if someone needed more electricity, we just burnt more coal and now we have a situation where a lot of energy is coming from cleaner sources like renewables, like wind and solar, which means it's a variable, it changes over time and there's no battery. And so if you needed to use more electricity in the past you just burnt more coal. Now we have these scenarios where, how clean or dirty electricity is just varying over time. And so what you, as a consumer of electricity can do something called load shifting, which is moving your workload either to a different region where electricity's cleaner or to different time when electricity's cleaner. And that is one really interesting mechanism of reducing the carbon emissions of your software. There's others, I don't know if you want to go through all eight of them, but those are the three key ones.

Given that the carbon used to construct a piece of hardware is typically higher than the carbon that will be omitted through electricity consumption during its lifetime, isn't focusing on the software focusing on the wrong thing? [11:07]

Charles Humble: I think that's fine. As you said, you've hit the three main ones. But I do want to talk a little bit more about embedded carbon. This is a subject that Anne Currie has written about recently. She was a guest on the podcast and I know that you know her because she's also on the Green Software Foundation along with you. And she argued in a blog post recently that we should all be architecting our software in a way that means that the hardware will last longer. And I've been thinking about this a bit because when I got started in the industry, it was a 8 bit Commodore 64/ZX spectrum era.

The hardware had a relatively long lifespan and programmers of various kinds learned how to get the maximum out of it. You see a bit the same with consoles now, that they have a relatively long lifespan. While they say your smartphone probably doesn't, you maybe keep it two or three years. There's a similar problem with servers in data centers and the embedded carbon that is the carbon used to construct a piece of hardware is typically higher than the carbon that will be omitted through electricity consumption during its lifetime. So isn't focusing on the software focusing on the wrong thing?

Asim Hussain: My world is all about trying to answer the question, if you're in the business of building software, what influence do you have? And so yes, there are other truths out there like yes, a lot of the carbon emissions are with hardware. The solutions, if you're in the software industry, you probably don't have much influence over it. The one thing you do have influence over is, as you said and mentioned, which is the, can you make hardware last longer? Which is also just a really challenging request to teams because your other pressure that you have, just want to be blunt, the other pressure that you have is you got to beat out your competition and have the better service that has the better features, that's faster, that you know your competitors are doing that as well. But at the end of the day, the only reason and I think the argument comes very much from a mobile and laptop perspective.

Well mobile and the tablets are very much the types of devices where they're so energy efficient these days that most of the carbon is in the embodied carbon from that, servers are different. Most of the carbon will be from the electricity that servers consume just because they're just their powerhouses and your mobiles and your laptops and your tablets are, they're just built a little differently. The screen goes off, they're actually built in such a way that it reduces the clock cycles. If it's not being used, it really conserves it a lot and it's not going to break, there's no moving parts, it's not going to break. So I'm going to make a decision to get rid of this mobile phone, that's all that's going to happen. I'm going to make a decision to get rid of it. And that decision will be influenced by my perceived performance.

So applications I'm using on it might start feeling a lot slower, that's because applications are just now coded up to expect the latest chip sets. And it's also perhaps app vendors are going to just stop building applications that work on my phone. I remember when I had to get rid of my mum's phone a while ago because Skype just stopped working on it. There was nothing we could do and we use Skype. So we just had to get her a new phone. That was the reason for it. It was just an application stopped working on it. And so from a software perspective, we had it a long time. Anyway, with the feature phones moving, which is, if you wanted to encompass the global audience out there, you have to stop writing your mobile applications for the 1% of people that owned an iPhone 13 and you needed to start looking at the breadth of people.

Vast majority of the world do not have the powerhouse devices that the bleading edge has. So you do need to start looking at them and building applications that way. You can look at the web world, which does a lot of stuff around progressive enhancement. So rather than right now, assuming that someone's got the latest spec and trying to degrade it somehow, if they've got a lower end spec in the web world, the right method is assume someone's got, well it's not based on specifications but other features, assume people are at the lower level and only build in additional functionality. If you've detected that they actually have those features available, those are some of the ways you could actually start building software to work on older devices.

Aside from demand shifting, what are some of the other things we can do?  [15:13]

Charles Humble: What are some of the other things we can do? We've talked about demand shifting. So moving your workloads around to take advantage of more green sources of energy but what else can we be doing as developers and as software architects now?

Asim Hussain: I think it still factors into when we look at carbon awareness because there's actually two aspects of it, which is really when you double click into what you're actually doing when you are responding to signals from the energy system because that's all that this is. This information, which is carbon intensity or electricity, it's just information from the energy system telling you, this is my state that I'm in, respond accordingly.

When you run software, when the carbon intensity is less, what you're doing is running software that's coming mostly from renewables, which means you are then supporting those power plants that are renewable power plants. So your health being to transition the energy grid towards a renewable powered one. The challenge, everyone talks about, we need electricity to come from 100% renewable powered sources, that's our goal. That's the goal. The UK grid needs to be a hundred percent powered by renewables. The challenge with that is that we don't have control over when the energy's coming or going.

We also need to be able to store the energy generated from renewables. And we don't yet have a way to do that, right? [16:32]

Charles Humble: Right and related to that is the whole problem of storage and density, energy density. So fossil fuels are on the whole very energy dense and oil is extremely energy-dense. Nothing else really compares with it at all. I believe I'm right in saying that solar energy, for example has a density of about 1.5 microjoules per cubic meter, which is about 20 quadrillion times less than oil. We've backed away from nuclear, which I would argue was probably a mistake. Although there are reasons why but we are now in this situation where we need to be able to store the energy generated from renewables. And we don't yet have a way to do that, right?

Asim Hussain: If I had a slide, I a show the audience, I could explain it. But one of the really interesting things that happens when you look at what you're doing, when you're shifting electricity, for all intents and purposes, you look like a battery. I know this sounds kind of conceptually it's weird. How can software look like a battery? But for all intents and purposes to a utility provider, you're a battery. So the ability to shift loads around at different times is that equivalent. In fact, a another term that's often used in this industry is called a virtual power plant; load shifting through time and through space looks like a power plant because you can say moving work loads to different times, acts the same way on the energy system as a power plant.

So there's actually startups and stuff that are trying to, IOT the world together, all the battery storage devices in the world together like laptop battery storage devices together and EV charging devices together because it looks like a power plant. So when you make your application carbon aware, not only are you taking advantage of lower-carbon electricity, so you yourself could then argue, well my application is emitting less carbon. You're actually playing a part in the transition, which is the point I wanted to make. You're playing your part in helping the energy systems move towards a renewable future, which is I think an interesting add on to that whole process.

If you could monitor your carbon use you could optimize for that overtime as you do other metrics in software.  But how do you get that data?[18:25]

Charles Humble: Right. And what's interesting there is presumably if there is some way that you can measure your carbon use, your impact over time, then that becomes another thing that as developers and as architects, you can be optimizing for, in the same way that you might optimize over time for financial cost. You might monitor the price of your Amazon bill and if that suddenly spikes, then you would investigate that and hopefully bring it back down again. You could be doing the same thing for your carbon usage. If you could get the data, if you could monitor that but how do you get the data? How do you monitor what's going on?

Asim Hussain: It's one of the things that we're working on in the Green Software Foundation is that, it's the measurement process. Every one of our member of organizations have identified this as their biggest challenge, is we need a method of measuring our software because the existing methods of measuring have problems, right now we have the greenhouse gas protocol. That's the main method people use to measure everything inside organizations. The really annoying thing about software is that it doesn't all fit inside an organization. One example I give is, is Windows. So Windows is used by however many hundreds of thousands of organizations in the world. But the way the greenhouse gas protocol works is only the Microsoft employees that use Microsoft Windows would factor into a scope one and two, at least, which is a part of the emissions characteristic. And open source as well, there's no organization around open source projects.

And yet everything we use in the Cloud or pretty much everything we use in the Cloud is based on open source technologies. How clean and dirty are those open source technologies? An organization might have pressure on itself to make its proprietary technology greener but really you probably want the open source technologies underneath it to have the similar pressures to become more efficient or to have greener applications. And so the thing that we're developing is something called the Software Carbon Intensity Specification, which is not a total, it's an intensity, it's a rate. So for Windows, it might be carbon per user. And also the other position that we've taken is that, neutralizations and by neutralizations we mean offsets and renewable energy credits and what we talk, what with renewable energy is actually the way it's bought and sold is actually an offset. So we have taken the position that offsets are very important but they shouldn't be factored into the calculations from a software perspective.

Because if you were to give an organization a choice, say, "Look, you need to reduce your carbon emissions of your software by 50%. It's going to cost you 20 million to do that, if you used our dev teams to do it. Oh and by the way, you probably won't be able to deliver half the features you want to deliver over the next year or you can spend 500,000 on buying some offsets." Most of the time people would purchase offsets. And the investment wouldn't flow into the things we need it to flow into, which is reducing the emissions of your software systems.

And that's why building the SCI from scratch. It's built up 100% for software, for software systems, whether you are a huge distributed Cloud system or a small monolithic open source library, it's applicable to you. And the fact that it's a rate rather than the total means it incentivizes reductions rather than neutralizations, which is where unfortunately a lot of the effort tends to get biased towards these days. And that's the big challenge that we have is to have a method of measurement that is designed just for software.

What are the next steps for the Green Software Foundation? [21:41]

Charles Humble: What are the next steps for the Green Software Foundation?

Asim Hussain: A lot of our work right now is focused around the initial release of the SCI specification, post that it will be focused around ensuring people understand how to apply the SCI specification on a whole variety of use cases from Cloud to all these other things. And then the next step is ensuring people have the data because a lot of this stuff requires data, calculation stuff requires data. The SCI is quite theoretical without access to the data, it's still useful but it's theoretical. So the next step is how do we ensure that, that data becomes available? One of the directions we believe is to work with policy makers and the SCI in some shape or form becomes policy somewhere. Then we were just going to see the data flow. The data's going to be made available, could there be a regulatory requirement to make it available?

And if we can make the SCI somehow included in ESG ratings, inside organizations, we call them ESG consultancies that give ESG a ratings to organizations. Then that will encourage the opening of the data but really what software needs, the biggest challenges we need right now is the data, we need to know. We need to be able to measure. Almost the rest of it is quite easy. Once you can measure, understanding what you need to do to reduce is not that complicated. We all know what we need to do to reduce these days, it's use less electricity, fewer hardware resources and electricity more intelligently. We can write down all those options are without a method of measurement it's hard for organizations to invest effort into this. And it's hard for organizations to prioritize what project you do first?

Without understanding the impact, how would you know, which do you focus on? Energy reduction, do you focus on hardware reduction? Where do you focus on first? So it's a measuring is what it's all about. So from the SCI that's the foundation's initial focus. We've also got a large community aspect to it as well. So large community education. It's actually growing the audience of what we call Green Software practitioners. We will be focusing a lot on speaking and events just to get the message out. And that once they've got the main SCI focus done, we'll be starting to run workshops. Everything we create is open source and creative commons.

We're creating our creative commons workshops that anybody can run inside their organizations, to teach them how to take any type of Cloud application or whatever and make it greener. And then we're growing a global network of meetups and really trying to expand the set of people out there. If you're an organization it's very, very hard to find somebody these days, who's knowledgeable enough to advise you concretely on how to reduce the carbon emissions of your software system. So our goal is to increase that or increase the set of people that the organizations can reach out to and hire with the set of knowledge, to be able to do this stuff.

If listeners want to get involved in the Green Software Foundation, how can they do that at the moment? [24:27]

Charles Humble: Finally, if listeners want to get involved in the Green Software Foundation, how can they do that at the moment?

Asim Hussain: Well, if you are an employee from one of our existing member organizations, which is quite likely because if the number of employees, I think I calculated, there are about a million employees of our member organizations, their parent companies. Is to reach out to your representatives. You go to the greensoftware.foundation website, reach out to them and they'll tell you how to get involved.

If you're interested in joining the Green Software Foundation, again, head to the website, we have various levels of membership from steering to general. We don't right now have what we call a contributor membership, which means that if you are not joining as part of an organization, unfortunately it's really hard for you to join the foundation right now but join our newsletter because a lot of what we do is out in the open, it's open source, just the same way as you can get involved with any open source project, you'll be able to get involved any kind of foundation project that is open source.

It's just that members get access to our Slack and the act to joining the foundation is acknowledging you agree to a certain set of rules regarding patent, IP and copyright. So that usually happens in the more private forums. If it's all out in the open source, it's fairly straightforward but if you want to join the private forums and take part in the voting and things like that, you've got to be a member. If that makes sense. But yeah, generally head to the website right now, the best thing is to join our newsletter and we'll let you know all the stuff that we're doing.

Charles Humble: Great. And listeners can check the show notes for this episode and I'll make sure there's a link to the Green Software Foundation website in those. Asim, thank you very much indeed, for taking the time to talk to us today on the InfoQ podcast.

Asim Hussain: Thank you, Charles.

Mentioned

Learn how to solve complex software engineering and leadership challenges. Attend in-person at QCon London, (April 4-6) or attend online at QCon Plus (May 10-20).

QCon brings together the world's most innovative senior software engineers across multiple domains to share their real-world implementation of emerging trends and practices. Find practical inspiration (not product pitches) from software leaders deep in the trenches creating software, scaling architectures and fine-tuning their technical leadership to help you make the right decisions. Save your spot now!

More about our podcasts

You can keep up-to-date with the podcasts via our RSS Feed, and they are available via SoundCloud, Apple Podcasts, Spotify, Overcast and the Google Podcast. From this page you also have access to our recorded show notes. They all have clickable links that will take you directly to that part of the audio.

Previous podcasts

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT