Building a greener web
Adams, Chris
It's 2021, and we are in a climate emergency. If you're a web professional, you've probably figured out that if the internet runs on electricity, and a lot of electricity comes from burning fossil fuels, there are steps we can take as technologists to make our use of the internet measurably more sustainable, by changing how we use digital infrastructure. In this talk, we'll cover some of the levers available to you as a maker of digital services, and how we can extend open source tools to help design greener, more accessible, more performant websites. We'll show examples from companies you've heard of doing this in production right now, and give clear next steps for those beginning their climate journey.
 Hello, Foster. Welcome to Building a Greener Web, Patterns and Tooling for Carbon Aware Web Performance. My name is Chris Eddins and I'm a director of the Greener Web Foundation. I work with various other companies and I'm always working with them. I use talkers recorded so you can always pause me and play again. But the slide deck for the talk is also online along with a transcript and all the references I use. So I should introduce myself. Hello, I'm Chris. For the last 15 or so years I've been working as a kind of environmentally focused tech generalist doing product management system administration, design and development and mostly for wacky environmental data start-ups. The team that I've been working on has been understanding, quantifying and reducing the environmental impact of our work as digital professionals. These days, most of my time is spent working as one of the directors of the Greener Foundation. And if you'd like to work together, my future self should be answering questions in the chat for Foster STEM, but my details are also here. So during the 30 minutes I have with you, I hope to cover these three topics. First, I'll introduce the idea of carbon aware design and why I think it's a useful concept for an audience of professional technologists like yourselves. Next, I want to share with you a mental model I'm working on to help us think about the qualities we would need to see in the tools and software we build for a greener, more sustainable industry. Finally, I want to give you some pointers about where you can learn more about the subject and find others interested in applying these ideas to build a greener web. So why carbon aware? Carbon aware may be a new term to you. If this is the case, the chances are you're in good company. I only heard it myself last year, but I think it's a useful one and I'll try explaining below. But before I go too deeply into this, I think it's worth trying to limit the scope of this talk. As you might have noticed, we're in the middle of a pandemic. And as this cartoon now doing the rounds and social media suggests, it's just one of a number of crises unfolding. The biodiversity collapse happening around us is terrifying, and there is definitely more to sustainability than just carbon. However, I don't think I can address these well in a talk relating to web performance. So I'll focus where I think there are levers in your work as a professional technologist to do something. So I'm going to focus on carbon. Right, let's talk about carbon then. What I'm showing you here is known as the carbon skyscraper. It's a useful tool for understanding the extent to which we've changed our ecosystem. Rather than show the absolute figure of CO2 in the world, it shows how much the amount of carbon in the atmosphere has changed over time, and in particular, how much in the last 100 years it's shot right upwards. That jump has largely been down to us taking carbon out of the ground in the form of fossil fuels and burning it for energy. Now, that energy has been useful and without it, we wouldn't have Wi-Fi, smartphones, the internet and so on. But putting that much carbon into the sky has downsides. We're already seeing how many climate-related disasters are happening around us, and as we put more carbon in the sky, they'll keep getting worse. So we need to make changes to stop putting this carbon in the sky and actually get it out of the sky. And the sheer scale of the changes facing us now are daunting, and it's worth remembering these words from the Intergovernmental Panel on Climate Change, the IPCC, telling us what kind of changes we would need, which was aimed for policymakers. The words rapid, far-reaching and unprecedented were used. Now, when IPCC scientists use words like this, it's basically the equivalent to them grabbing us by the years and yelling in our faces to get our act together and to stop accelerating towards that iceberg. The science is literally spelling out how much we need to change our society to avoid the worst now. So where does the internet fit into this picture? Well, most estimates put carbon emissions from the internet and data centres to be responsible for between 1 and 2% of global carbon emissions. So that's in the same ballpark as aviation or shipping, or if you prefer countries, Canada or Germany. It's not small. There are a few reasons for this, but primarily the main one is that it runs on fossil fuels right now. And every time we use the net, even if we don't want to, we contribute to climate change. So if we didn't want to be a driver, it to be a driver of climate change, what would we need to do? Well, we can look at where we've had some successes already. If Moore's law has been incredibly helpful here, we've seen massive increases in the usage of compute over the last 10 years, but we haven't really seen the same growth in total energy usage as you can see. And to be honest, I'd argue that 1 to 2% of global emissions for all the benefits we've got so far has bring a pretty good deal. We get a lot of value from the internet. Imagine what this pandemic would have been like, would be like without it. It's worth looking at why we haven't seen this growth in energy use though. Most of the gains have come from ever cheaper, ever more powerful hardware being able to do more work for the same energy usage. And you can most clearly see this with our transition to the cloud. 10 years ago, most servers were in traditional-style data centers, but these days, there is a clear shift to larger, more efficient, hyperscale cloud ones. Because these large providers of these data centers work at a greater scale to smaller ones and are able to invest more in the design of the hardware, it means that even if the stock we're running on them is the same, they're able to get much more performance per unit of energy used. However, the gains have not just come from hardware, as this paper illustrates. Before, we might have been able to rely on Moore's law to make everything faster, as on average, we managed to double the number of transistors on chips every 18 months. But in the last 10 months, it slowed down, and we have to rely on changes at the software level to keep providing the improvements. A good example of this might be how hyperscale providers have used various flavors of virtualization to run their data centers at a much higher rate of utilization as the smaller data centers. You can also see this with the adoption of GPUs and machine learning, and in our domain, as web professionals, you can also see the same thing when browsers began to offload the rendering of pages onto the GPUs of laptops and mobiles and things like that. Now, this has implications for us as developers. If we want increases in efficiency to keep up with our increased use of computing, these increases will need to come from the software layer, which is where we work. And while efficiency has been a historic lever, it's not the only one. It's helped because we've reduced the energy we've needed, but that has still come from fossil fuels. Another way to admit less carbon from burning fossil fuels though, is just to burn fewer fossil fuels. It's 2020, and we now have better, greener, safer ways to generate energy we need for computing now. But because so few of us understand the underlying energy systems that our industry relies on, we're not really aware of the opportunities there. This is where carbon-aware design comes from, and it's a growing and interesting field. The design is defined as the design of products and services to minimize the carbon emissions, resulting from their use over the lifetime of their existence. So if we wanted to apply carbon-aware practices to the web, what would they look like? Well, when working with a field new to us, having a way to remember the key ideas and principles, I think helps us think about the problems in a new way. And I think we can look to lessons learned by the accessibility community for where we might want to go with this. And while there are extensive specs that we might refer to as the web content authoring guidelines or the WCAG, you'll often hear the term poor used by people when talking about accessibility. So people use poor as a way to help remember what's important, as this quote suggests. So the idea is to create a poor website, to so to speak. If it helps developers memorize these principles, then it has served its purpose. And poor, if you haven't heard it before, stands for perceivable, operable, understandable and robust. Perceivable, in that as obvious as this statement may sound, but you need to be able to perceive content on a site to access it. If you can't perceive a site because you're blind, then you need to rely on other sensors to perceive it. Perceivable will might be designed for more than just one sense. Operable, by comparison, is about being able to interact with a site using more than just a mouse and keyboard. If you don't have strong motor skills, undo features are particularly important, for example. Understandable, understandable might be obvious, but we still get this wrong. We can use language that's difficult to understand, or we might choose to use alternate versions, which aren't so distracting for neurodiverse users, for example. And robust. Rebust might refer to building websites that work in conditions that are less than ideal. If you've been stuck waiting for a few megabytes of JavaScript to download on a phone when you just need some text information, you'll likely appreciate this. So, poor and the web content accessibility violence have become a norm in the public sector web, and you're now seeing the same in the private sector too. You might make an accessible website because it's the right thing to do anyway, but it also turns out to be good for risk reduction on your projects. If designing with accessibility in mind makes it more inclusive and also means you are less likely to be sued, like this example with Domino pizzas, then you're more likely to want to do it. And I think we're going to be seeing more like this in the field of websites and sustainability as the public sector wakes up to the fact that a. Often has legal obligations to cut emissions and B. People figure out that energy power and I just to weld has to come from somewhere and not knowing this is a risk. So you can see the signs of this in the UK's own technology strategy already. And now it's last September, there is increasingly explicit guidance on how public money needs to be spent and what people spending it need to look for in their supplies when buying any kind of digital service. So if you want to sell to public sector, this is the kind of stuff that you'll need to be able to demonstrate more of that I've highlighted here. And just like this has started in the public sector, I think you're likely to see the same thing happen in the private sector too. So inspired by this. So what would Paul look like for a greener carbon aware web inspired by this? I want to share this question with you and then I want to try answering it in a way that is hopefully interesting and useful to you. It's a work in progress. So I'd really appreciate your feedback to make it better. I think a possible answer to this question I posed is gold standing for green open lean and distributed. Let's look at these in more detail. Green here refers to using the greenest possible input inputs for what we do. It takes energy and carbon to run computers and we should aim to run them on the greenest energy we can find. The active making computers is also resource intensive. So we should be working to minimize the impact there too. But in the time I have with you, I'll focus primarily on the first point here. We've already covered efficiency as a lever for carbon emissions. So if you can send less data over the wire, you use less energy, which means low low emissions. Tools like website carbon here make this really explicit now. But as we know, the other way to burn less carbon is to not use fossil fuels. My organization, the Green Road Foundation provides the data to check if providers of servers are using green power. Now green power is a complex subject, but I do my best to provide a useful summary. As a user of electricity, you will usually be drawing it from your national grid. And you don't have direct control over who puts power into that grid, as in how the power is generated. Moreover, this grid makes changes at different times of day. So because it's not always windy and because solar panels don't work so well at night. So if this is the case, how can you make power green if you're drawing it from the grid? There are lots of ways to do this, but the easiest to understand approach, and the one I like the most, is the one I'm going to try summarizing here. You make sure that whoever you work with to provide energy for your computing puts at least as much power into the grid with green power as the power you've used coming from fossil fuels. So on average, you end up with a greener grid for everybody, as the amount of renewables increases over time going into the grid. Now this is obviously a no-resimplification, but if you can keep this idea in your head, it helps. I'll cover some of the details next. So far, you might be wondering about how it's possible to have green power when it comes from sources that are variable, like I've just said. So these charts show increasingly levels of resolution for energy from wind in Denmark. And as the quote from Bo Tramberg says, 30% of power per year does not mean 30% of power every hour of the year. But if over a year you look at the power going into the grid from renewable sources that you've paid for, and it's more than you've taken out, you can arguably say that you've been running it on green power. If this is unsatisfying to you, there's some really interesting work from larger providers like Google and Microsoft in this field now. This picture comes from Google's new report 24-7 by 2030, where they set out a vision for being able to run all their infrastructure on green power every hour of every day. That is to always match the power they draw from the grid, with carbon-free power going into the grid. They do this a few ways, but one way, as you can see, is to over-provision renewables and then store the energy in huge batteries, so when there are fewer renewables on the grid, they draw power from those batteries rather than fossil fuels. There are other benefits to this approach, which I'll cover later. Finally, it's worth noting that some companies say they run in green power by just offsetting the carbon emissions from the fossil fuels in the grid mix. While we recognize this in the Greenberg Foundation, as some parts of the world just don't have the regulatory structure to make any of the stuff I've described earlier possible, I think there are other approaches which I've described which solve the problem in a more direct and more satisfying way, and I think they're preferable, but this is a valid way of doing this too. So we spoke of green as one principle, and another one would be open. And because efficiency will increase and you come from us having opportunities for improvement up and down the stack, I think open is necessary. I use open as an approach, as I think it goes beyond open source. All around the world, for example, governments expose APIs that list the carbon intensity of the fuel mix going into the national grids around the world. If you wanted to, you could write tools that query this data and tell you the fuel mix just like there's charts I showed you. This is pretty much what the open source project electricity map is. It aggregates real time information of how clean the energy is around the world at different points of time based on the energy mix. If you want to reduce the emissions from data over the wire, there are tools you can use for that. You can use Google's Lighthouse, but I prefer another tool that I'd like to share with you called SightSpeed. It's in use by the Wiki Media Foundation and a bunch of other companies, and I recommend trying it out. But what I want to draw your attention to is how it scores different things. It seems an obvious in retrospect that a huge advertising company might not talk about privacy when talking about how to build good websites, even if it's important to a lot of us. And just because a project is open source, it doesn't mean that the creators' interests are the same as your interests. So I'd argue that open is about being prepared to engage with issues from users and stakeholders as much as the license itself. And this is one thing that I found interesting about SightSpeed is that they do do this. And the example I point you to is some work on SightSpeed done last year to build carbon calculation into SightSpeed itself. In March last year, a PR I worked on was merged in to make it possible to understand the carbon burn, as in the fossil fuels burned, for any website from any site. Open allows participation from places you might not expect. So we've covered green and open. Now it's time to refer to the one you're more familiar with, which I'm calling lean. Now, until we've changed how the entire internet is powered, we'll need to rely on efficiency in a lot of places, and we'll need to make sure the carbon we do emit counts. In November, Mozilla released their first ever sustainability report, where they tried to quantify the carbon emissions from the digital services they provide. Inside, they did something really interesting, which is to include emissions from end user devices and data transfer in their calculations. And the results for eye-opening, more than 98% of their reported emissions come from energy used by user devices, as in us. This is a way of reporting is rare, but totally valid and gives a new perspective on where the responsibility lies when we build digital services that we expect others to use. And if we wanted to measurably affect the energy used and therefore the carbon from their usage, I think tools and resources like energy patterns here is really worth a look. In addition to being part of Dr. Louis Cruz's PhD thesis on green computing, it's also a website cataloging patterns observed from querying thousands of open source repos on GitHub to find examples of these patterns in the world. It's focused primarily on mobile, but many of the patterns apply to other spots of the stack too. And it's hard to manage things you can't measure. And it's easier to manage things that you can't measure. And it's also easier to manage things if you can track them over time. Now, there are plenty of hosted services out there that help you do this, but the out-of-the-box dashboards for Grafana and SightSpeed give you some stats that you might find useful if you're starting out with this. And if they're good enough for Wikipedia, they're probably good enough to start with for a lot of us now. But what's really cool, I think, is that since last summer, the new default dashboards also feature carbon figures too, like you can see here. So we've spoken about green, open, and lean. Now, the final one is distributed, which is moving work through time and space to avoid carbon emissions. This sounds fancy, but it really isn't. We've covered how energy efficient code can be carbon efficient code. And we might know intuitively that running infrastructure in parts of the world with loads of green energy will likely be greener than running it somewhere on loads of fossil fuels. So I'll focus on the time aspect, because I think it's the most exciting. I mentioned before that supply and demand is dynamic when it comes to power in the grid. So when it's sunny and windy, we might have an excess of energy, but the grid still needs to be balanced or bad things happen in general. When this happens, it's often cheaper for grid operators to pay people to use power than it is to pay people who run power stations to turn down the power they feed into the grid. This is simply because these power stations have so many moving parts. And this means energy costs can go below zero. So here's a chart from March last year in the UK showing this phenomenon, sometimes referred to as the duck curve, because well, it looks like a duck. If you can design for that, it changes the economics of our work. And we can go from being just consumers of power to active participants in building a greener, more responsive grid. As an aside, if you think this is interesting, this is already something companies sell directly to consumers. So if you have stuff that uses a decent amount of power at home, you can time it to get paid to use it rather than paying to use it like these folks here, Octopus. Anyway, back to data centers. Remember that chart showing that flat line from Google for data center use and then running when we're talking about them running on renewable power 24 seven. Well, it turns out that data centers have the highest energy density per square foot of any kind of building, even more than aluminium swelters. And if you design them to do so, you can also design them so they can respond quickly to changes in demand on the grid to take advantage of this duck curve. Google are already doing this, and they talk about this as a planet friendly energy saving measure. But if you can distribute jobs and work through time to run it when energy is cheap and green, you end up with lower carbon emissions, but it can also turn something that used to cost you money into something that makes you money. This is supposed to be a talk about web performance. So here's an example of applying these principles of carbon to a design in production. Last year I worked with the team on a digital magazine all about the sustainable web called branch magazine. We knew that the carbon footprint of data of the wire changes based on the proportion of renewables on the grid. So instead of just having a performance budget, we tried we tried designing with a carbon budget. When the wind was blowing and the sun was shining, we'd serve the high bandwidth rich version. This is when you might use a web worker to download assets in the background and pre-cached up as much as you could. If you already have the content locally, then you don't need to make any subsequent requests over the network to know to get around it, making it feel faster too. Conversely, when the grid was largely supplied by power from fossil fuels, we knew a carbon budget wouldn't go so far. So we showed this, but we also designed the site to account for this lower bandwidth scenario. Every time we'd use an image, we'd have to think about how it would look in the low bandwidth scenario. And designing this way forced us to always be able to serve a fast site. But it also had the side effects of forcing us to think about accessibility too, which is a good thing. So if we can't send a big photo, a key and it's a key part of the story, we then at least need to communicate these ideas with good looking alt text on the images and so on. A user could always ever write this. And if we had already had a field of browsers cache of content when energy was cheap and green, then it would make sense to serve the rich images we already have. But you get the general idea. Browsers are really capable these days. While this is a basic example, this principle applies in loads of places. You can do this with downloadable search indexes and so on. So that's gold. Green, open, lean and distributed. So I said I'd provide some next steps. These are the two I would suggest. First is to follow the link below to climateaction.tech, because next week there's a whole campaign starting around the idea of low carbon websites. Being led by Hannah Smith and Louis Cruz, who are both absolute experts in this field. I help organize this community and I learn so much from being part of it. I think it's a single best place you can go to learn more about this as a subject. Also, these links and Twitter accounts and hashtags are the ones I think would be most useful to you if you want to go learn more. I really enjoy being part of CAT, which is climateaction.tech. And if you like this talk, I think you would too. Finally, I'd also recommend visiting the special page for FOSDEM on the screen for the shareable version of this talk that collects all the links and sources I referenced. At the GreenMove Foundation, we use open data, open source and an open approach to help speed a transition from fossil fuels online. All of our tools and data sets are free to use and we're always looking for folks to work with. If you'd like to get in touch, my details are on this page and hopefully my future self has been making himself useful and helping answer questions in the chat. So yeah, thanks for your time, FOSDEM. Bye. Does the CU2 cost include production of hardware? Yes, in most cases it does. This is referred to as the embodied carbon emissions for creating service and typically for servers, about 25% of the carbon footprint of a server over four years is actually from the making of it rather than the running of it. I didn't talk too much about that because when we're working with performance, it's not something we have direct control over. But yeah, this is absolutely a thing to look at. As it happens, there's some people from a company called Sesame who basically have reused, basically reused data stuff from existing data centers so that if you want to reduce this, you can. It's a really cool company. Cool. Okay, so we had the next one. Google and Microsoft are claiming a very large part of subsistence, the Dutch renewables, which leaves S for other uses. Reducing should be mentioned before optimizing the source. So this is a question largely around messaging because the way large companies report their carbon emissions, they try to claim these figures here. Now, the thing to bear in mind is that this is an issue about reporting. It doesn't actually mean that you're using more fossil fuel power than them or anything like it when this happens because that's not how the grid works. All right. Basically, what it means is, yes, when companies like this buy renewables, it does reduce the carbon intensity of the grid in, say, the Netherlands, for example. But the way it's often reported and the way it's often interpreted in the media is that people conflate the responsibility for, say, carbon emissions from the steps people take to reduce this. And I can share a link to a really, really good video to explain this in more detail by the folks at ElectricityMap who are, who I imagine, who I see as absolute experts here and have a really, really good way of explaining it. Because a lot of us get this wrong and it's really frustrating because there is lots of reasons why you can be uncomfortable about huge companies. But this is one reason, this is not a good reason to be worried about people's when they're probably the second, the largest contributor to renewables right now. Okay. Thank you. So the next next question from programmers. Yes, and green regulations in the European Union is working on. So we need to think about changing our applications now. Yes. There is. So there's two things, the EU Commission in their data strategy, which have shared a link in the etherpad, they have a target to have every single data center carbon neutral. I think it's climate neutral by 2030. So people will be asking for this. Also companies, countries themselves have legally binding targets to get to zero carbon. And that means that if you're in their supply chain of any country or any large company, they'll be asking you these questions. So yeah, there is legislation pushing for this and it does make sense to be aware of this because you'll be getting ahead of it in many ways.
 Hello, Foster. Welcome to Building a Greener Web, Patterns and Tooling for Carbon Aware  Web Performance. My name is Chris Eddins and I'm a director of the Greener Web Foundation.  I work with various other companies and I'm always working with them.  I use talkers recorded so you can always pause me and play again.  But the slide deck for the talk is also online along with a transcript and all the references I use.  So I should introduce myself. Hello, I'm Chris. For the last 15 or so years I've been working as a kind of environmentally focused tech generalist doing product management system administration, design and development and mostly for wacky environmental data start-ups.  The team that I've been working on has been understanding, quantifying and reducing the environmental impact of our work as digital professionals.  These days, most of my time is spent working as one of the directors of the Greener Foundation.  And if you'd like to work together, my future self should be answering questions in the chat for Foster STEM, but my details are also here.  So during the 30 minutes I have with you, I hope to cover these three topics. First, I'll introduce the idea of carbon aware design and why I think it's a useful concept for an audience of professional technologists like yourselves.  Next, I want to share with you a mental model I'm working on to help us think about the qualities we would need to see in the tools and software we build for a greener, more sustainable industry.  Finally, I want to give you some pointers about where you can learn more about the subject and find others interested in applying these ideas to build a greener web.  So why carbon aware? Carbon aware may be a new term to you. If this is the case, the chances are you're in good company. I only heard it myself last year, but I think it's a useful one and I'll try explaining below.  But before I go too deeply into this, I think it's worth trying to limit the scope of this talk. As you might have noticed, we're in the middle of a pandemic.  And as this cartoon now doing the rounds and social media suggests, it's just one of a number of crises unfolding.  The biodiversity collapse happening around us is terrifying, and there is definitely more to sustainability than just carbon.  However, I don't think I can address these well in a talk relating to web performance. So I'll focus where I think there are levers in your work as a professional technologist to do something.  So I'm going to focus on carbon. Right, let's talk about carbon then. What I'm showing you here is known as the carbon skyscraper.  It's a useful tool for understanding the extent to which we've changed our ecosystem.  Rather than show the absolute figure of CO2 in the world, it shows how much the amount of carbon in the atmosphere has changed over time, and in particular, how much in the last 100 years it's shot right upwards.  That jump has largely been down to us taking carbon out of the ground in the form of fossil fuels and burning it for energy.  Now, that energy has been useful and without it, we wouldn't have Wi-Fi, smartphones, the internet and so on.  But putting that much carbon into the sky has downsides. We're already seeing how many climate-related disasters are happening around us, and as we put more carbon in the sky, they'll keep getting worse.  So we need to make changes to stop putting this carbon in the sky and actually get it out of the sky.  And the sheer scale of the changes facing us now are daunting, and it's worth remembering these words from the Intergovernmental Panel on Climate Change, the IPCC,  telling us what kind of changes we would need, which was aimed for policymakers.  The words rapid, far-reaching and unprecedented were used.  Now, when IPCC scientists use words like this, it's basically the equivalent to them grabbing us by the years and yelling in our faces to get our act together and to stop accelerating towards that iceberg.  The science is literally spelling out how much we need to change our society to avoid the worst now.  So where does the internet fit into this picture?  Well, most estimates put carbon emissions from the internet and data centres to be responsible for between 1 and 2% of global carbon emissions.  So that's in the same ballpark as aviation or shipping, or if you prefer countries, Canada or Germany. It's not small.  There are a few reasons for this, but primarily the main one is that it runs on fossil fuels right now.  And every time we use the net, even if we don't want to, we contribute to climate change.  So if we didn't want to be a driver, it to be a driver of climate change, what would we need to do?  Well, we can look at where we've had some successes already.  If Moore's law has been incredibly helpful here, we've seen massive increases in the usage of compute over the last 10 years, but we haven't really seen the same growth in total energy usage as you can see.  And to be honest, I'd argue that 1 to 2% of global emissions for all the benefits we've got so far has bring a pretty good deal.  We get a lot of value from the internet.  Imagine what this pandemic would have been like, would be like without it.  It's worth looking at why we haven't seen this growth in energy use though.  Most of the gains have come from ever cheaper, ever more powerful hardware being able to do more work for the same energy usage.  And you can most clearly see this with our transition to the cloud.  10 years ago, most servers were in traditional-style data centers, but these days, there is a clear shift to larger, more efficient, hyperscale cloud ones.  Because these large providers of these data centers work at a greater scale to smaller ones and are able to invest more in the design of the hardware, it means that even if the stock we're running on them is the same, they're able to get much more performance per unit of energy used.  However, the gains have not just come from hardware, as this paper illustrates.  Before, we might have been able to rely on Moore's law to make everything faster, as on average, we managed to double the number of transistors on chips every 18 months.  But in the last 10 months, it slowed down, and we have to rely on changes at the software level to keep providing the improvements.  A good example of this might be how hyperscale providers have used various flavors of virtualization to run their data centers at a much higher rate of utilization as the smaller data centers.  You can also see this with the adoption of GPUs and machine learning, and in our domain, as web professionals, you can also see the same thing when browsers began to offload the rendering of pages onto the GPUs of laptops and mobiles and things like that.  Now, this has implications for us as developers. If we want increases in efficiency to keep up with our increased use of computing, these increases will need to come from the software layer, which is where we work.  And while efficiency has been a historic lever, it's not the only one. It's helped because we've reduced the energy we've needed, but that has still come from fossil fuels.  Another way to admit less carbon from burning fossil fuels though, is just to burn fewer fossil fuels. It's 2020, and we now have better, greener, safer ways to generate energy we need for computing now.  But because so few of us understand the underlying energy systems that our industry relies on, we're not really aware of the opportunities there.  This is where carbon-aware design comes from, and it's a growing and interesting field. The design is defined as the design of products and services to minimize the carbon emissions, resulting from their use over the lifetime of their existence.  So if we wanted to apply carbon-aware practices to the web, what would they look like?  Well, when working with a field new to us, having a way to remember the key ideas and principles, I think helps us think about the problems in a new way.  And I think we can look to lessons learned by the accessibility community for where we might want to go with this.  And while there are extensive specs that we might refer to as the web content authoring guidelines or the WCAG, you'll often hear the term poor used by people when talking about accessibility.  So people use poor as a way to help remember what's important, as this quote suggests.  So the idea is to create a poor website, to so to speak. If it helps developers memorize these principles, then it has served its purpose.  And poor, if you haven't heard it before, stands for perceivable, operable, understandable and robust.  Perceivable, in that as obvious as this statement may sound, but you need to be able to perceive content on a site to access it.  If you can't perceive a site because you're blind, then you need to rely on other sensors to perceive it. Perceivable will might be designed for more than just one sense.  Operable, by comparison, is about being able to interact with a site using more than just a mouse and keyboard.  If you don't have strong motor skills, undo features are particularly important, for example.  Understandable, understandable might be obvious, but we still get this wrong.  We can use language that's difficult to understand, or we might choose to use alternate versions, which aren't so distracting for neurodiverse users, for example.  And robust.  Rebust might refer to building websites that work in conditions that are less than ideal.  If you've been stuck waiting for a few megabytes of JavaScript to download on a phone when you just need some text information, you'll likely appreciate this.  So, poor and the web content accessibility violence have become a norm in the public sector web, and you're now seeing the same in the private sector too.  You might make an accessible website because it's the right thing to do anyway, but it also turns out to be good for risk reduction on your projects.  If designing with accessibility in mind makes it more inclusive and also means you are less likely to be sued, like this example with Domino pizzas, then you're more likely to want to do it.  And I think we're going to be seeing more like this in the field of websites and sustainability as the public sector wakes up to the fact that a.  Often has legal obligations to cut emissions and B.  People figure out that energy power and I just to weld has to come from somewhere and not knowing this is a risk.  So you can see the signs of this in the UK's own technology strategy already.  And now it's last September, there is increasingly explicit guidance on how public money needs to be spent and what people spending it need to look for in their supplies when buying any kind of digital service.  So if you want to sell to public sector, this is the kind of stuff that you'll need to be able to demonstrate more of that I've highlighted here.  And just like this has started in the public sector, I think you're likely to see the same thing happen in the private sector too.  So inspired by this. So what would Paul look like for a greener carbon aware web inspired by this?  I want to share this question with you and then I want to try answering it in a way that is hopefully interesting and useful to you.  It's a work in progress. So I'd really appreciate your feedback to make it better.  I think a possible answer to this question I posed is gold standing for green open lean and distributed.  Let's look at these in more detail.  Green here refers to using the greenest possible input inputs for what we do.  It takes energy and carbon to run computers and we should aim to run them on the greenest energy we can find.  The active making computers is also resource intensive.  So we should be working to minimize the impact there too.  But in the time I have with you, I'll focus primarily on the first point here.  We've already covered efficiency as a lever for carbon emissions.  So if you can send less data over the wire, you use less energy, which means low low emissions.  Tools like website carbon here make this really explicit now.  But as we know, the other way to burn less carbon is to not use fossil fuels.  My organization, the Green Road Foundation provides the data to check if providers of servers are using green power.  Now green power is a complex subject, but I do my best to provide a useful summary.  As a user of electricity, you will usually be drawing it from your national grid.  And you don't have direct control over who puts power into that grid, as in how the power is generated.  Moreover, this grid makes changes at different times of day.  So because it's not always windy and because solar panels don't work so well at night.  So if this is the case, how can you make power green if you're drawing it from the grid?  There are lots of ways to do this, but the easiest to understand approach, and the one I like the most, is the one I'm going to try summarizing here.  You make sure that whoever you work with to provide energy for your computing  puts at least as much power into the grid with green power as the power you've used coming from fossil fuels.  So on average, you end up with a greener grid for everybody, as the amount of renewables increases over time going into the grid.  Now this is obviously a no-resimplification, but if you can keep this idea in your head, it helps.  I'll cover some of the details next.  So far, you might be wondering about how it's possible to have green power when it comes from sources that are variable, like I've just said.  So these charts show increasingly levels of resolution for energy from wind in Denmark.  And as the quote from Bo Tramberg says, 30% of power per year does not mean 30% of power every hour of the year.  But if over a year you look at the power going into the grid from renewable sources that you've paid for, and it's more than you've taken out,  you can arguably say that you've been running it on green power.  If this is unsatisfying to you, there's some really interesting work from larger providers like Google and Microsoft in this field now.  This picture comes from Google's new report 24-7 by 2030, where they set out a vision for being able to run all their infrastructure on green power every hour of every day.  That is to always match the power they draw from the grid, with carbon-free power going into the grid.  They do this a few ways, but one way, as you can see, is to over-provision renewables and then store the energy in huge batteries,  so when there are fewer renewables on the grid, they draw power from those batteries rather than fossil fuels.  There are other benefits to this approach, which I'll cover later.  Finally, it's worth noting that some companies say they run in green power by just offsetting the carbon emissions from the fossil fuels in the grid mix.  While we recognize this in the Greenberg Foundation, as some parts of the world just don't have the regulatory structure to make any of the stuff I've described earlier possible,  I think there are other approaches which I've described which solve the problem in a more direct and more satisfying way,  and I think they're preferable, but this is a valid way of doing this too.  So we spoke of green as one principle, and another one would be open.  And because efficiency will increase and you come from us having opportunities for improvement up and down the stack, I think open is necessary.  I use open as an approach, as I think it goes beyond open source.  All around the world, for example, governments expose APIs that list the carbon intensity of the fuel mix going into the national grids around the world.  If you wanted to, you could write tools that query this data and tell you the fuel mix just like there's charts I showed you.  This is pretty much what the open source project electricity map is.  It aggregates real time information of how clean the energy is around the world at different points of time based on the energy mix.  If you want to reduce the emissions from data over the wire, there are tools you can use for that.  You can use Google's Lighthouse, but I prefer another tool that I'd like to share with you called SightSpeed.  It's in use by the Wiki Media Foundation and a bunch of other companies, and I recommend trying it out.  But what I want to draw your attention to is how it scores different things.  It seems an obvious in retrospect that a huge advertising company might not talk about privacy when talking about how to build good websites, even if it's important to a lot of us.  And just because a project is open source, it doesn't mean that the creators' interests are the same as your interests.  So I'd argue that open is about being prepared to engage with issues from users and stakeholders as much as the license itself.  And this is one thing that I found interesting about SightSpeed is that they do do this.  And the example I point you to is some work on SightSpeed done last year to build carbon calculation into SightSpeed itself.  In March last year, a PR I worked on was merged in to make it possible to understand the carbon burn, as in the fossil fuels burned, for any website from any site.  Open allows participation from places you might not expect.  So we've covered green and open. Now it's time to refer to the one you're more familiar with, which I'm calling lean.  Now, until we've changed how the entire internet is powered, we'll need to rely on efficiency in a lot of places, and we'll need to make sure the carbon we do emit counts.  In November, Mozilla released their first ever sustainability report, where they tried to quantify the carbon emissions from the digital services they provide.  Inside, they did something really interesting, which is to include emissions from end user devices and data transfer in their calculations.  And the results for eye-opening, more than 98% of their reported emissions come from energy used by user devices, as in us.  This is a way of reporting is rare, but totally valid and gives a new perspective on where the responsibility lies when we build digital services that we expect others to use.  And if we wanted to measurably affect the energy used and therefore the carbon from their usage, I think tools and resources like energy patterns here is really worth a look.  In addition to being part of Dr. Louis Cruz's PhD thesis on green computing, it's also a website cataloging patterns observed from querying thousands of open source repos on GitHub to find examples of these patterns in the world.  It's focused primarily on mobile, but many of the patterns apply to other spots of the stack too.  And it's hard to manage things you can't measure. And it's easier to manage things that you can't measure.  And it's also easier to manage things if you can track them over time.  Now, there are plenty of hosted services out there that help you do this, but the out-of-the-box dashboards for Grafana and SightSpeed give you some stats that you might find useful if you're starting out with this.  And if they're good enough for Wikipedia, they're probably good enough to start with for a lot of us now.  But what's really cool, I think, is that since last summer, the new default dashboards also feature carbon figures too, like you can see here.  So we've spoken about green, open, and lean. Now, the final one is distributed, which is moving work through time and space to avoid carbon emissions.  This sounds fancy, but it really isn't. We've covered how energy efficient code can be carbon efficient code.  And we might know intuitively that running infrastructure in parts of the world with loads of green energy will likely be greener than running it somewhere on loads of fossil fuels.  So I'll focus on the time aspect, because I think it's the most exciting.  I mentioned before that supply and demand is dynamic when it comes to power in the grid.  So when it's sunny and windy, we might have an excess of energy, but the grid still needs to be balanced or bad things happen in general.  When this happens, it's often cheaper for grid operators to pay people to use power than it is to pay people who run power stations to turn down the power they feed into the grid.  This is simply because these power stations have so many moving parts. And this means energy costs can go below zero.  So here's a chart from March last year in the UK showing this phenomenon, sometimes referred to as the duck curve, because well, it looks like a duck.  If you can design for that, it changes the economics of our work. And we can go from being just consumers of power to active participants in building a greener, more responsive grid.  As an aside, if you think this is interesting, this is already something companies sell directly to consumers.  So if you have stuff that uses a decent amount of power at home, you can time it to get paid to use it rather than paying to use it like these folks here, Octopus.  Anyway, back to data centers.  Remember that chart showing that flat line from Google for data center use and then running when we're talking about them running on renewable power 24 seven.  Well, it turns out that data centers have the highest energy density per square foot of any kind of building, even more than aluminium swelters.  And if you design them to do so, you can also design them so they can respond quickly to changes in demand on the grid to take advantage of this duck curve.  Google are already doing this, and they talk about this as a planet friendly energy saving measure.  But if you can distribute jobs and work through time to run it when energy is cheap and green, you end up with lower carbon emissions, but it can also turn something that used to cost you money into something that makes you money.  This is supposed to be a talk about web performance.  So here's an example of applying these principles of carbon to a design in production.  Last year I worked with the team on a digital magazine all about the sustainable web called branch magazine.  We knew that the carbon footprint of data of the wire changes based on the proportion of renewables on the grid.  So instead of just having a performance budget, we tried we tried designing with a carbon budget.  When the wind was blowing and the sun was shining, we'd serve the high bandwidth rich version.  This is when you might use a web worker to download assets in the background and pre-cached up as much as you could.  If you already have the content locally, then you don't need to make any subsequent requests over the network to know to get around it, making it feel faster too.  Conversely, when the grid was largely supplied by power from fossil fuels, we knew a carbon budget wouldn't go so far.  So we showed this, but we also designed the site to account for this lower bandwidth scenario.  Every time we'd use an image, we'd have to think about how it would look in the low bandwidth scenario.  And designing this way forced us to always be able to serve a fast site.  But it also had the side effects of forcing us to think about accessibility too, which is a good thing.  So if we can't send a big photo, a key and it's a key part of the story, we then at least need to communicate these ideas with good looking alt text on the images  and so on. A user could always ever write this.  And if we had already had a field of browsers cache of content when energy was cheap and green, then it would make sense to serve the rich images we already have.  But you get the general idea. Browsers are really capable these days.  While this is a basic example, this principle applies in loads of places.  You can do this with downloadable search indexes and so on.  So that's gold. Green, open, lean and distributed.  So I said I'd provide some next steps. These are the two I would suggest.  First is to follow the link below to climateaction.tech, because next week there's a whole campaign starting around the idea of low carbon websites.  Being led by Hannah Smith and Louis Cruz, who are both absolute experts in this field.  I help organize this community and I learn so much from being part of it.  I think it's a single best place you can go to learn more about this as a subject.  Also, these links and Twitter accounts and hashtags are the ones I think would be most useful to you if you want to go learn more.  I really enjoy being part of CAT, which is climateaction.tech.  And if you like this talk, I think you would too.  Finally, I'd also recommend visiting the special page for FOSDEM on the screen for the shareable version of this talk that collects all the links and sources I referenced.  At the GreenMove Foundation, we use open data, open source and an open approach to help speed a transition from fossil fuels online.  All of our tools and data sets are free to use and we're always looking for folks to work with.  If you'd like to get in touch, my details are on this page and hopefully my future self has been making himself useful and helping answer questions in the chat.  So yeah, thanks for your time, FOSDEM. Bye.  Does the CU2 cost include production of hardware?  Yes, in most cases it does.  This is referred to as the embodied carbon emissions for creating service and typically for servers, about 25% of the carbon footprint of a server over four years is actually from the making of it rather than the running of it.  I didn't talk too much about that because when we're working with performance, it's not something we have direct control over.  But yeah, this is absolutely a thing to look at.  As it happens, there's some people from a company called Sesame who basically have reused, basically reused data stuff from existing data centers so that if you want to reduce this, you can.  It's a really cool company.  Cool.  Okay, so we had the next one.  Google and Microsoft are claiming a very large part of subsistence, the Dutch renewables, which leaves S for other uses.  Reducing should be mentioned before optimizing the source.  So this is a question largely around messaging because the way large companies report their carbon emissions, they try to claim these figures here.  Now, the thing to bear in mind is that this is an issue about reporting.  It doesn't actually mean that you're using more fossil fuel power than them or anything like it when this happens because that's not how the grid works.  All right.  Basically, what it means is, yes, when companies like this buy renewables, it does reduce the carbon intensity of the grid in, say, the Netherlands, for example.  But the way it's often reported and the way it's often interpreted in the media is that people conflate the responsibility for, say, carbon emissions from the steps people take to reduce this.  And I can share a link to a really, really good video to explain this in more detail by the folks at ElectricityMap who are, who I imagine, who I see as absolute experts here and have a really, really good way of explaining it.  Because a lot of us get this wrong and it's really frustrating because there is lots of reasons why you can be uncomfortable about huge companies.  But this is one reason, this is not a good reason to be worried about people's when they're probably the second, the largest contributor to renewables right now.  Okay.  Thank you.  So the next next question from programmers.  Yes, and green regulations in the European Union is working on.  So we need to think about changing our applications now.  Yes.  There is.  So there's two things, the EU Commission in their data strategy, which have shared a link in the etherpad, they have a target to have every single data center carbon neutral.  I think it's climate neutral by 2030.  So people will be asking for this.  Also companies, countries themselves have legally binding targets to get to zero carbon.  And that means that if you're in their supply chain of any country or any large company, they'll be asking you these questions.  So yeah, there is legislation pushing for this and it does make sense to be aware of this because you'll be getting ahead of it in many ways.
webperf_building_a_greener_web_0_287.png webperf_building_a_greener_web_288_887.png webperf_building_a_greener_web_888_1895.png webperf_building_a_greener_web_1896_2759.png webperf_building_a_greener_web_2760_2987.png webperf_building_a_greener_web_2988_3035.png webperf_building_a_greener_web_3036_3095.png webperf_building_a_greener_web_3096_4079.png webperf_building_a_greener_web_4080_5471.png webperf_building_a_greener_web_5472_6407.png webperf_building_a_greener_web_6408_7379.png webperf_building_a_greener_web_7380_8159.png webperf_building_a_greener_web_8160_9191.png webperf_building_a_greener_web_9192_10859.png webperf_building_a_greener_web_10860_11711.png webperf_building_a_greener_web_11712_12251.png webperf_building_a_greener_web_12252_12971.png webperf_building_a_greener_web_12972_13331.png webperf_building_a_greener_web_13332_14975.png webperf_building_a_greener_web_14976_15635.png webperf_building_a_greener_web_15636_16211.png webperf_building_a_greener_web_16212_16451.png webperf_building_a_greener_web_16452_16619.png webperf_building_a_greener_web_16620_16883.png webperf_building_a_greener_web_16884_17327.png webperf_building_a_greener_web_17328_17555.png webperf_building_a_greener_web_17556_18095.png webperf_building_a_greener_web_18096_18875.png webperf_building_a_greener_web_18876_19619.png webperf_building_a_greener_web_19620_20531.png webperf_building_a_greener_web_20532_21407.png webperf_building_a_greener_web_21408_22463.png webperf_building_a_greener_web_22464_23219.png webperf_building_a_greener_web_23220_23627.png webperf_building_a_greener_web_23628_24371.png webperf_building_a_greener_web_24372_25751.png webperf_building_a_greener_web_25752_26291.png webperf_building_a_greener_web_26292_26747.png webperf_building_a_greener_web_26748_27623.png webperf_building_a_greener_web_27624_28499.png webperf_building_a_greener_web_28500_29327.png webperf_building_a_greener_web_29328_29543.png webperf_building_a_greener_web_29544_30311.png webperf_building_a_greener_web_30312_31559.png webperf_building_a_greener_web_31560_31967.png webperf_building_a_greener_web_31968_32075.png webperf_building_a_greener_web_32076_32615.png webperf_building_a_greener_web_32616_33119.png webperf_building_a_greener_web_33120_34247.png webperf_building_a_greener_web_34248_35735.png webperf_building_a_greener_web_35736_35855.png webperf_building_a_greener_web_35856_35975.png webperf_building_a_greener_web_35976_36563.png webperf_building_a_greener_web_36564_37823.png webperf_building_a_greener_web_37824_38099.png webperf_building_a_greener_web_38100_41207.png webperf_building_a_greener_web_41208_41483.png webperf_building_a_greener_web_41484_41987.png webperf_building_a_greener_web_41988_42755.png webperf_building_a_greener_web_42756_42876.png
Hello, Foster. Welcome to Building a Greener Web, Patterns and Tooling for Carbon Aware Web Performance. My name is Chris Eddins and I'm a director of the Greener Web Foundation. I work with various other companies and I'm always working with them. I use talkers recorded so you can always pause me and play again. But the slide deck for the talk is also online along with a transcript and all the references I use. So I should introduce myself. Hello, I'm Chris. For the last 15 or so years I've been working as a kind of environmentally focused tech generalist doing product management system administration, design and development and mostly for wacky environmental data start-ups. The team that I've been working on has been understanding, quantifying and reducing the environmental impact of our work as digital professionals. These days, most of my time is spent working as one of the directors of the Greener Foundation. And if you'd like to work together, my future self should be answering questions in the chat for Foster STEM, but my details are also here. So during the 30 minutes I have with you, I hope to cover these three topics. First, I'll introduce the idea of carbon aware design and why I think it's a useful concept for an audience of professional technologists like yourselves. Next, I want to share with you a mental model I'm working on to help us think about the qualities we would need to see in the tools and software we build for a greener, more sustainable industry. Finally, I want to give you some pointers about where you can learn more about the subject and find others interested in applying these ideas to build a greener web. So why carbon aware? Carbon aware may be a new term to you. If this is the case, the chances are you're in good company. I only heard it myself last year, but I think it's a useful one and I'll try explaining below. But before I go too deeply into this, I think it's worth trying to limit the scope of this talk. As you might have noticed, we're in the middle of a pandemic. And as this cartoon now doing the rounds and social media suggests, it's just one of a number of crises unfolding. The biodiversity collapse happening around us is terrifying, and there is definitely more to sustainability than just carbon. However, I don't think I can address these well in a talk relating to web performance. So I'll focus where I think there are levers in your work as a professional technologist to do something. So I'm going to focus on carbon. Right, let's talk about carbon then. What I'm showing you here is known as the carbon skyscraper. It's a useful tool for understanding the extent to which we've changed our ecosystem. Rather than show the absolute figure of CO2 in the world, it shows how much the amount of carbon in the atmosphere has changed over time, and in particular, how much in the last 100 years it's shot right upwards. That jump has largely been down to us taking carbon out of the ground in the form of fossil fuels and burning it for energy. Now, that energy has been useful and without it, we wouldn't have Wi-Fi, smartphones, the internet and so on. But putting that much carbon into the sky has downsides. We're already seeing how many climate-related disasters are happening around us, and as we put more carbon in the sky, they'll keep getting worse. So we need to make changes to stop putting this carbon in the sky and actually get it out of the sky. And the sheer scale of the changes facing us now are daunting, and it's worth remembering these words from the Intergovernmental Panel on Climate Change, the IPCC, telling us what kind of changes we would need, which was aimed for policymakers. The words rapid, far-reaching and unprecedented were used. Now, when IPCC scientists use words like this, it's basically the equivalent to them grabbing us by the years and yelling in our faces to get our act together and to stop accelerating towards that iceberg. The science is literally spelling out how much we need to change our society to avoid the worst now. So where does the internet fit into this picture? Well, most estimates put carbon emissions from the internet and data centres to be responsible for between 1 and 2% of global carbon emissions. So that's in the same ballpark as aviation or shipping, or if you prefer countries, Canada or Germany. It's not small. There are a few reasons for this, but primarily the main one is that it runs on fossil fuels right now. And every time we use the net, even if we don't want to, we contribute to climate change. So if we didn't want to be a driver, it to be a driver of climate change, what would we need to do? Well, we can look at where we've had some successes already. If Moore's law has been incredibly helpful here, we've seen massive increases in the usage of compute over the last 10 years, but we haven't really seen the same growth in total energy usage as you can see. And to be honest, I'd argue that 1 to 2% of global emissions for all the benefits we've got so far has bring a pretty good deal. We get a lot of value from the internet. Imagine what this pandemic would have been like, would be like without it. It's worth looking at why we haven't seen this growth in energy use though. Most of the gains have come from ever cheaper, ever more powerful hardware being able to do more work for the same energy usage. And you can most clearly see this with our transition to the cloud. 10 years ago, most servers were in traditional-style data centers, but these days, there is a clear shift to larger, more efficient, hyperscale cloud ones. Because these large providers of these data centers work at a greater scale to smaller ones and are able to invest more in the design of the hardware, it means that even if the stock we're running on them is the same, they're able to get much more performance per unit of energy used. However, the gains have not just come from hardware, as this paper illustrates. Before, we might have been able to rely on Moore's law to make everything faster, as on average, we managed to double the number of transistors on chips every 18 months. But in the last 10 months, it slowed down, and we have to rely on changes at the software level to keep providing the improvements. A good example of this might be how hyperscale providers have used various flavors of virtualization to run their data centers at a much higher rate of utilization as the smaller data centers. You can also see this with the adoption of GPUs and machine learning, and in our domain, as web professionals, you can also see the same thing when browsers began to offload the rendering of pages onto the GPUs of laptops and mobiles and things like that. Now, this has implications for us as developers. If we want increases in efficiency to keep up with our increased use of computing, these increases will need to come from the software layer, which is where we work. And while efficiency has been a historic lever, it's not the only one. It's helped because we've reduced the energy we've needed, but that has still come from fossil fuels. Another way to admit less carbon from burning fossil fuels though, is just to burn fewer fossil fuels. It's 2020, and we now have better, greener, safer ways to generate energy we need for computing now. But because so few of us understand the underlying energy systems that our industry relies on, we're not really aware of the opportunities there. This is where carbon-aware design comes from, and it's a growing and interesting field. The design is defined as the design of products and services to minimize the carbon emissions, resulting from their use over the lifetime of their existence. So if we wanted to apply carbon-aware practices to the web, what would they look like? Well, when working with a field new to us, having a way to remember the key ideas and principles, I think helps us think about the problems in a new way. And I think we can look to lessons learned by the accessibility community for where we might want to go with this. And while there are extensive specs that we might refer to as the web content authoring guidelines or the WCAG, you'll often hear the term poor used by people when talking about accessibility. So people use poor as a way to help remember what's important, as this quote suggests. So the idea is to create a poor website, to so to speak. If it helps developers memorize these principles, then it has served its purpose. And poor, if you haven't heard it before, stands for perceivable, operable, understandable and robust. Perceivable, in that as obvious as this statement may sound, but you need to be able to perceive content on a site to access it. If you can't perceive a site because you're blind, then you need to rely on other sensors to perceive it. Perceivable will might be designed for more than just one sense. Operable, by comparison, is about being able to interact with a site using more than just a mouse and keyboard. If you don't have strong motor skills, undo features are particularly important, for example. Understandable, understandable might be obvious, but we still get this wrong. We can use language that's difficult to understand, or we might choose to use alternate versions, which aren't so distracting for neurodiverse users, for example. And robust. Rebust might refer to building websites that work in conditions that are less than ideal. If you've been stuck waiting for a few megabytes of JavaScript to download on a phone when you just need some text information, you'll likely appreciate this. So, poor and the web content accessibility violence have become a norm in the public sector web, and you're now seeing the same in the private sector too. You might make an accessible website because it's the right thing to do anyway, but it also turns out to be good for risk reduction on your projects. If designing with accessibility in mind makes it more inclusive and also means you are less likely to be sued, like this example with Domino pizzas, then you're more likely to want to do it. And I think we're going to be seeing more like this in the field of websites and sustainability as the public sector wakes up to the fact that a. Often has legal obligations to cut emissions and B. People figure out that energy power and I just to weld has to come from somewhere and not knowing this is a risk. So you can see the signs of this in the UK's own technology strategy already. And now it's last September, there is increasingly explicit guidance on how public money needs to be spent and what people spending it need to look for in their supplies when buying any kind of digital service. So if you want to sell to public sector, this is the kind of stuff that you'll need to be able to demonstrate more of that I've highlighted here. And just like this has started in the public sector, I think you're likely to see the same thing happen in the private sector too. So inspired by this. So what would Paul look like for a greener carbon aware web inspired by this? I want to share this question with you and then I want to try answering it in a way that is hopefully interesting and useful to you. It's a work in progress. So I'd really appreciate your feedback to make it better. I think a possible answer to this question I posed is gold standing for green open lean and distributed. Let's look at these in more detail. Green here refers to using the greenest possible input inputs for what we do. It takes energy and carbon to run computers and we should aim to run them on the greenest energy we can find. The active making computers is also resource intensive. So we should be working to minimize the impact there too. But in the time I have with you, I'll focus primarily on the first point here. We've already covered efficiency as a lever for carbon emissions. So if you can send less data over the wire, you use less energy, which means low low emissions. Tools like website carbon here make this really explicit now. But as we know, the other way to burn less carbon is to not use fossil fuels. My organization, the Green Road Foundation provides the data to check if providers of servers are using green power. Now green power is a complex subject, but I do my best to provide a useful summary. As a user of electricity, you will usually be drawing it from your national grid. And you don't have direct control over who puts power into that grid, as in how the power is generated. Moreover, this grid makes changes at different times of day. So because it's not always windy and because solar panels don't work so well at night. So if this is the case, how can you make power green if you're drawing it from the grid? There are lots of ways to do this, but the easiest to understand approach, and the one I like the most, is the one I'm going to try summarizing here. You make sure that whoever you work with to provide energy for your computing puts at least as much power into the grid with green power as the power you've used coming from fossil fuels. So on average, you end up with a greener grid for everybody, as the amount of renewables increases over time going into the grid. Now this is obviously a no-resimplification, but if you can keep this idea in your head, it helps. I'll cover some of the details next. So far, you might be wondering about how it's possible to have green power when it comes from sources that are variable, like I've just said. So these charts show increasingly levels of resolution for energy from wind in Denmark. And as the quote from Bo Tramberg says, 30% of power per year does not mean 30% of power every hour of the year. But if over a year you look at the power going into the grid from renewable sources that you've paid for, and it's more than you've taken out, you can arguably say that you've been running it on green power. If this is unsatisfying to you, there's some really interesting work from larger providers like Google and Microsoft in this field now. This picture comes from Google's new report 24-7 by 2030, where they set out a vision for being able to run all their infrastructure on green power every hour of every day. That is to always match the power they draw from the grid, with carbon-free power going into the grid. They do this a few ways, but one way, as you can see, is to over-provision renewables and then store the energy in huge batteries, so when there are fewer renewables on the grid, they draw power from those batteries rather than fossil fuels. There are other benefits to this approach, which I'll cover later. Finally, it's worth noting that some companies say they run in green power by just offsetting the carbon emissions from the fossil fuels in the grid mix. While we recognize this in the Greenberg Foundation, as some parts of the world just don't have the regulatory structure to make any of the stuff I've described earlier possible, I think there are other approaches which I've described which solve the problem in a more direct and more satisfying way, and I think they're preferable, but this is a valid way of doing this too. So we spoke of green as one principle, and another one would be open. And because efficiency will increase and you come from us having opportunities for improvement up and down the stack, I think open is necessary. I use open as an approach, as I think it goes beyond open source. All around the world, for example, governments expose APIs that list the carbon intensity of the fuel mix going into the national grids around the world. If you wanted to, you could write tools that query this data and tell you the fuel mix just like there's charts I showed you. This is pretty much what the open source project electricity map is. It aggregates real time information of how clean the energy is around the world at different points of time based on the energy mix. If you want to reduce the emissions from data over the wire, there are tools you can use for that. You can use Google's Lighthouse, but I prefer another tool that I'd like to share with you called SightSpeed. It's in use by the Wiki Media Foundation and a bunch of other companies, and I recommend trying it out. But what I want to draw your attention to is how it scores different things. It seems an obvious in retrospect that a huge advertising company might not talk about privacy when talking about how to build good websites, even if it's important to a lot of us. And just because a project is open source, it doesn't mean that the creators' interests are the same as your interests. So I'd argue that open is about being prepared to engage with issues from users and stakeholders as much as the license itself. And this is one thing that I found interesting about SightSpeed is that they do do this. And the example I point you to is some work on SightSpeed done last year to build carbon calculation into SightSpeed itself. In March last year, a PR I worked on was merged in to make it possible to understand the carbon burn, as in the fossil fuels burned, for any website from any site. Open allows participation from places you might not expect. So we've covered green and open. Now it's time to refer to the one you're more familiar with, which I'm calling lean. Now, until we've changed how the entire internet is powered, we'll need to rely on efficiency in a lot of places, and we'll need to make sure the carbon we do emit counts. In November, Mozilla released their first ever sustainability report, where they tried to quantify the carbon emissions from the digital services they provide. Inside, they did something really interesting, which is to include emissions from end user devices and data transfer in their calculations. And the results for eye-opening, more than 98% of their reported emissions come from energy used by user devices, as in us. This is a way of reporting is rare, but totally valid and gives a new perspective on where the responsibility lies when we build digital services that we expect others to use. And if we wanted to measurably affect the energy used and therefore the carbon from their usage, I think tools and resources like energy patterns here is really worth a look. In addition to being part of Dr. Louis Cruz's PhD thesis on green computing, it's also a website cataloging patterns observed from querying thousands of open source repos on GitHub to find examples of these patterns in the world. It's focused primarily on mobile, but many of the patterns apply to other spots of the stack too. And it's hard to manage things you can't measure. And it's easier to manage things that you can't measure. And it's also easier to manage things if you can track them over time. Now, there are plenty of hosted services out there that help you do this, but the out-of-the-box dashboards for Grafana and SightSpeed give you some stats that you might find useful if you're starting out with this. And if they're good enough for Wikipedia, they're probably good enough to start with for a lot of us now. But what's really cool, I think, is that since last summer, the new default dashboards also feature carbon figures too, like you can see here. So we've spoken about green, open, and lean. Now, the final one is distributed, which is moving work through time and space to avoid carbon emissions. This sounds fancy, but it really isn't. We've covered how energy efficient code can be carbon efficient code. And we might know intuitively that running infrastructure in parts of the world with loads of green energy will likely be greener than running it somewhere on loads of fossil fuels. So I'll focus on the time aspect, because I think it's the most exciting. I mentioned before that supply and demand is dynamic when it comes to power in the grid. So when it's sunny and windy, we might have an excess of energy, but the grid still needs to be balanced or bad things happen in general. When this happens, it's often cheaper for grid operators to pay people to use power than it is to pay people who run power stations to turn down the power they feed into the grid. This is simply because these power stations have so many moving parts. And this means energy costs can go below zero. So here's a chart from March last year in the UK showing this phenomenon, sometimes referred to as the duck curve, because well, it looks like a duck. If you can design for that, it changes the economics of our work. And we can go from being just consumers of power to active participants in building a greener, more responsive grid. As an aside, if you think this is interesting, this is already something companies sell directly to consumers. So if you have stuff that uses a decent amount of power at home, you can time it to get paid to use it rather than paying to use it like these folks here, Octopus. Anyway, back to data centers. Remember that chart showing that flat line from Google for data center use and then running when we're talking about them running on renewable power 24 seven. Well, it turns out that data centers have the highest energy density per square foot of any kind of building, even more than aluminium swelters. And if you design them to do so, you can also design them so they can respond quickly to changes in demand on the grid to take advantage of this duck curve. Google are already doing this, and they talk about this as a planet friendly energy saving measure. But if you can distribute jobs and work through time to run it when energy is cheap and green, you end up with lower carbon emissions, but it can also turn something that used to cost you money into something that makes you money. This is supposed to be a talk about web performance. So here's an example of applying these principles of carbon to a design in production. Last year I worked with the team on a digital magazine all about the sustainable web called branch magazine. We knew that the carbon footprint of data of the wire changes based on the proportion of renewables on the grid. So instead of just having a performance budget, we tried we tried designing with a carbon budget. When the wind was blowing and the sun was shining, we'd serve the high bandwidth rich version. This is when you might use a web worker to download assets in the background and pre-cached up as much as you could. If you already have the content locally, then you don't need to make any subsequent requests over the network to know to get around it, making it feel faster too. Conversely, when the grid was largely supplied by power from fossil fuels, we knew a carbon budget wouldn't go so far. So we showed this, but we also designed the site to account for this lower bandwidth scenario. Every time we'd use an image, we'd have to think about how it would look in the low bandwidth scenario. And designing this way forced us to always be able to serve a fast site. But it also had the side effects of forcing us to think about accessibility too, which is a good thing. So if we can't send a big photo, a key and it's a key part of the story, we then at least need to communicate these ideas with good looking alt text on the images and so on. A user could always ever write this. And if we had already had a field of browsers cache of content when energy was cheap and green, then it would make sense to serve the rich images we already have. But you get the general idea. Browsers are really capable these days. While this is a basic example, this principle applies in loads of places. You can do this with downloadable search indexes and so on. So that's gold. Green, open, lean and distributed. So I said I'd provide some next steps. These are the two I would suggest. First is to follow the link below to climateaction.tech, because next week there's a whole campaign starting around the idea of low carbon websites. Being led by Hannah Smith and Louis Cruz, who are both absolute experts in this field. I help organize this community and I learn so much from being part of it. I think it's a single best place you can go to learn more about this as a subject. Also, these links and Twitter accounts and hashtags are the ones I think would be most useful to you if you want to go learn more. I really enjoy being part of CAT, which is climateaction.tech. And if you like this talk, I think you would too. Finally, I'd also recommend visiting the special page for FOSDEM on the screen for the shareable version of this talk that collects all the links and sources I referenced. At the GreenMove Foundation, we use open data, open source and an open approach to help speed a transition from fossil fuels online. All of our tools and data sets are free to use and we're always looking for folks to work with. If you'd like to get in touch, my details are on this page and hopefully my future self has been making himself useful and helping answer questions in the chat. So yeah, thanks for your time, FOSDEM. Bye. Does the CU2 cost include production of hardware? Yes, in most cases it does. This is referred to as the embodied carbon emissions for creating service and typically for servers, about 25% of the carbon footprint of a server over four years is actually from the making of it rather than the running of it. I didn't talk too much about that because when we're working with performance, it's not something we have direct control over. But yeah, this is absolutely a thing to look at. As it happens, there's some people from a company called Sesame who basically have reused, basically reused data stuff from existing data centers so that if you want to reduce this, you can. It's a really cool company. Cool. Okay, so we had the next one. Google and Microsoft are claiming a very large part of subsistence, the Dutch renewables, which leaves S for other uses. Reducing should be mentioned before optimizing the source. So this is a question largely around messaging because the way large companies report their carbon emissions, they try to claim these figures here. Now, the thing to bear in mind is that this is an issue about reporting. It doesn't actually mean that you're using more fossil fuel power than them or anything like it when this happens because that's not how the grid works. All right. Basically, what it means is, yes, when companies like this buy renewables, it does reduce the carbon intensity of the grid in, say, the Netherlands, for example. But the way it's often reported and the way it's often interpreted in the media is that people conflate the responsibility for, say, carbon emissions from the steps people take to reduce this. And I can share a link to a really, really good video to explain this in more detail by the folks at ElectricityMap who are, who I imagine, who I see as absolute experts here and have a really, really good way of explaining it. Because a lot of us get this wrong and it's really frustrating because there is lots of reasons why you can be uncomfortable about huge companies. But this is one reason, this is not a good reason to be worried about people's when they're probably the second, the largest contributor to renewables right now. Okay. Thank you. So the next next question from programmers. Yes, and green regulations in the European Union is working on. So we need to think about changing our applications now. Yes. There is. So there's two things, the EU Commission in their data strategy, which have shared a link in the etherpad, they have a target to have every single data center carbon neutral. I think it's climate neutral by 2030. So people will be asking for this. Also companies, countries themselves have legally binding targets to get to zero carbon. And that means that if you're in their supply chain of any country or any large company, they'll be asking you these questions. So yeah, there is legislation pushing for this and it does make sense to be aware of this because you'll be getting ahead of it in many ways.
greener, more sustainable industry. Finally, I carbon emissions from the internet and data primarily the main one is that it runs on fossil fewer fossil fuels. It's 2020, and we now have design comes from, and it's a growing and idea in your head, it helps. I'll cover some of open source project electricity map is. It there are tools you can use for that. You can use lot of places, and we'll need to make sure the from the digital services they provide. Inside, already doing this, and they talk about this as a right now. Okay. Thank you. So the next next So we need to think about changing our carbon neutral. I think it's climate neutral by means that if you're in their supply chain of any