 Ever wanted to know more about the environmental impact of software? How about ways to reduce the carbon footprint of your own software and services? In this detailed data-driven analysis, Kyle Jones for Maitech will share some of the strategies that your teams can take on to reduce the energy consumption of your software. During this talk, you may notice that Kyle's recommendations align or overlap with other goals that your organization is pursuing around efficiency, cloud adoption, and sustainability. I hope you enjoy Kyle's talk and find some things that you can bring back to your own organization. Enjoy. Hi, and welcome to the session on building greener software at Kids Lab Commit 2021. My name is Kyle. I'm a software engineer based in Wales in the UK, and I'm a nurse, and I currently work at a company called Maitech. Around two years ago, I became a vegan after watching a bunch of documentaries on animal agriculture. Animal agriculture is known to have a strong relationship with a bunch of topics including animal rights, genetic diseases, and climate change. It was these documentaries that led to and had a real impact on me and led to changes in both my personal and professional life, which then led to this talk. So before we start, I'd like to say a couple of words about Maitech. Maitech are an organization of public sector technology delivery experts. We provide digital data and technology services across the UK market. We help the public sector leaders to modernize legacy applications and working practices, accelerate digital service delivery, drive smart decisions with data, and enable improved technology skills within teams of all shapes and all sizes. Before we can start to take a look at the steps that we can take in order to make the software we build a bit more environmentally friendly, we should start at the beginning and get a better idea of the resources we use day to day in order to understand the impact we're currently having and the actions we can take to mitigate that. By this, I mean the resources we use when designing services, engineering the components, deploying them to a particular platform, and then hosting them in the long term, as well as the maintenance of these. So as you may have already guessed, the resource we use the most of is electricity. Global electricity used by data centers is around one to three percent of all the electricity generated globally. In 2015, this equated to around about 416 terawatt hours. In comparison, the UK uses only 300 terawatt hours annually. This means that data centers around the world used over 115 terawatt hours more than the entire UK. The problem with this is the majority of this energy is not generated through renewable technologies. 47 percent of the UK's energy in 2020 was produced through renewable sources. But even including biomass and nuclear only brings this total up to around 60 percent. This means that over 40 percent of the electricity used to power global data centers is run through fossil fuels. 2020 was a record-breaking year, but that still meant that 181 grams of CO2 was produced per kilowatt hour used. To put this into perspective, the average solar panel in England generates around 3,000 kilowatt hours per year in ideal conditions. The conditions for this estimate is for a solar panel in Yorkshire on a sunny day. The average wind turbine generates around six gigawatt hours per year, which is significantly more but still nowhere near the terawatt hours needed by data centers. Using these numbers, we can calculate that in order to produce the 416 terawatt hours used by data centers, over 146 million solar panels or 69,000 wind turbines would be required. Habitat for humanity, who estimated that around 1 billion people or 13 percent still have no access to electricity. The other resource we use a lot of is water. Water is used as a coolant to cool the hardware or to reduce the temperature of the air, which is then used to cool the hardware. In 2014, US data centers used 626 billion gallons of water, and in 2021, a single Google data center used 1.5 million gallons. To compare this, the average medium-sized data center uses about the same as three hospitals or eight households. This is assuming the average household uses around 77 gallons on the average day. For those of you who are in a way, one gallon is equal to around about 16 glasses of water. This is all in comparison to the fact that a large portion of the world still has little to no access to clean running water. Now that we're more aware of the resources we're using, it's time to take a look at the actions we can take in order to mitigate their impact and reduce our overall usage. I'll do this by splitting all the actions into two categories. A set of fairly high-level technical improvements that can be made by engineers and another set of actions for non-technical teams such as HR departments. Made-text core mission and the data-day activities of DevOps-focused teams generally reduce resource usage over traditional teams. The first step we can take that has the biggest impact is simply migrating to cloud hosted infrastructure. Cloud hosted infrastructure uses 65% of its overall utilization, whereas the average on-premise solution only uses between 12% and 18%. It's estimated that by 2022, 33% of enterprise infrastructure would be hosted on on-premise infrastructure. Cloud customers consume 77% fewer servers and reduce their carbon footprint by 28% due to these numbers. We can also compare cloud providers before choosing one, as each has their own goals and their own strategy when it comes to sustainability. It's important to remember that there is no right or wrong answer when choosing a cloud provider, as there may or may not be additional factors to consider. There are a few questions that we can ask when it comes to sustainability though. Is the provider investing in clean energy? Is the provider offsetting their carbon footprint? Does the provider provide carbon footprint metrics? And is the provider researching new ways to reduce their impact even further? Most major cloud providers invest in clean energy. This is due to it being in line with their own ESG goals, it reducing their overall running costs and allowing them to provide price more competitively. So this question is generally a root point. All three major providers, AWS, Microsoft and Google, have all publicly stated that they offset their carbon footprint in their company statements. Google, however, is the only one to publish carbon footprint metrics for each data center which is updated multiple times a day on a single web page. Microsoft allows carbon metrics to be extracted from Azure, however you have to use this on Power BI extension. Lastly, AWS only publishes general metrics in their company statements. AWS and Microsoft both research in new measures in order to reduce their overall resource usage. AWS are implementing reclaimed water for cooling and Azure are pioneering liquid immersion cooling for their data centers. More details about both of these measures can be found on their company websites. Adopting a surplus architecture means that you're choosing managed infrastructure with a pay-as-you-go pricing, generally has a shared hardware and has a high level of scalability and elasticity. What this means is that it allows engineers to have more time to solve business problems. The pricing strategy encourages a high utilization and on top of that any money saved can be put towards other actions like offsetting carbon footprint. Using shared hardware means that the 35% utilization being wasted by the average customer can then be pooled and leveraged by other customers, meaning there is little to no waste. Scalability and elasticity are similar to this in that they allow easy increase or decrease of our usage based on a number of factors including load. It's estimated that only 40% of organizations have adopted surplus architectures, so there's a lot of room for improvement on this. It seems silly reiterating the use of best practices, but it's always worth stating as there are a number of people who still don't follow these practices. The well-architected framework is a set of best practices for the design, delivery and maintenance of cloud-based architectures. It consists of five key pillars, security, reliability, performance efficiency, operational excellence, and cost optimization. Each of these pillars have a number of criteria and generally lend themselves quite well as they have elements that reduce resource usage by preventing idling and wasteful processes or by improving efficiency overall. Everyone knows that these days the website and the Facebook brand and these days every website seems to feel the need to be all singing and all dancing. Using more fonts, images, videos and dynamic content increases the current footprint of a website. Increased impact is minimal in comparison to the previous actions, but it's important to remember that the impact is per visitor and therefore adds up pretty quickly. One of these that stands out a little from the rest is blocking bots and web scrapers. In a previous role, my job consisted of building business intelligence tools that utilised machine learning in order to analyse content gathered through web scrapers. The measures used to block these web scrapers are generally quite minimal and the most common was to simply block a user agent header. However, in a lot of modern scraping frameworks like Scrapey, this is incredibly easy to bypass by simply updating the user agent header they're passing across. The other point on the screen that's different from the rest is caching. Caching reduces idling on the amount of data transferred across networks which prevents idling and speeds everything up that way. Improving the visibility of your impact provides evidence-based monitoring. Tools and metrics that can help with this include services from the GreenWeb Foundation, Hallgrain Digital, Google Cloud Platform, Microsoft, and Paul Johnston. The GreenWeb Foundation's tool is quite simple in that it just takes a URL in and compares the URL against a list of green hosting providers. Hallgrain Digital takes a URL and uses it to calculate the carbon footprint of a website using its file criteria. Data transfer over the wire, energy intensity of the web data, energy source used by the data center, carbon intensity of electricity, and website traffic. Now, some of you may recognize the name Paul Johnston. Paul Johnston previously worked as a Senior Developer Advocate at AWS and is the co-founder of the Surrealist Days conferences. His Cloud Suspense Sustainability Console is an extension that highlights AWS regions confirmed as running on 100% renewable energy. This empowers teams to choose regions that are a bit environmentally friendly. As I previously mentioned, it's not all about the engineering department stuff. Each organization has a number of non-technical teams working behind the scenes, including finance, HR, sales, and marketing, among others. Each department has their own processes that contribute and influence the overall footprint of an organization, and then therefore it's important to also address these impacts. Climate-friendly administration is important. Documentation detailing processes, metrics, and certifications can be incredibly useful. It improves communication around sustainability and gives you solid evidence of efforts which can then be provided to clients. Understanding your impact is vital, as it allows you to identify areas of improvement. EcoVardis is a ratings platform providing social responsibility assessments, including a focus on sustainability. It's used by over 75,000 companies in over 160 countries and is generally regarded as a pretty good measure of how good or bad a company is. Environment and sustainability policies are important as they set out the vision and expectations for the rest of the business. Certifications like the ISO of 14,000 family set out requirements and guidance on environmental management systems. These certifications are incredibly important and they feed in with the rest of these points because a lot of them require carbon footprint metrics and policies to be in place in order to achieve a good status. Empowering cloud with friendly choices. The main point for all of this is employment benefits. Choosing things like an ethical pension fund can have a huge impact on the environment. According to the Organization for Economic Cooperation and Development, or the OECD, more than 50 trillion was invested through pensions in 2019. On the other hand, Morgan Stanley has estimated the amount of money needed to finance meeting Paris climate agreements is also 50 trillion. That means that we could fix the climate crisis by simply reinvesting our pension funds. However, the majority of this money was invested in environmental damaging industries such as fossil fuels. Switching this is incredibly simple and generally takes a few minutes and a few clicks. Another major impact you can have is climate-friendly travel. Switching to a train or bike can help reduce the climate footprint of a trip by over 75%. You can also have the added benefit of improving health and fitness, which in turn reduces the amount of sick days taken by the average employee. Some climate-friendly travel options that can be implemented in a benefits package include car sharing schemes, cycle-to-work schemes, season ticket loans and e-car club credits. Food and drink is enjoyed by a lot of us day in, day out, as well as it being essential for life. But the average diet contains animal products and produces between 2.5 and 3.5 tonnes of CO2 equivalent per day. In comparison, a plant-based diet produces only 1.5 tonnes of CO2 equivalent every day. Simply put it in place, things like meatless Mondays or vegannery can have a huge effect, especially when you add up the impact of each individual person. We've all heard the old reduce-reuse-recycle mantra, but studies have found that small changes like reducing the size and number of waste bins improves recycling rates. Similarly, adding signs or messaging saying things like don't forget to recycle can help to drive recycling rates even higher. To start, simply switching out some general bins and providing some recycling bins and offices is a great place to start. So for the majority of the time that I've been speaking, I've been speaking about ways in which to reduce your impact. However, we should also look at ways that we can reduce where possible. Removing single-use items from office spaces can encourage reuse. The prime example for this is cheap disposable pens, versus encouraging use of more expensive refillable pens from brands such as Parker. This ensures that the lifecycle of the pen will extend for as long as possible and that harmful plastics do not end up in waste bins. Sharing resources and trading resources can also be a powerful tool. In my local area, my estate has a WhatsApp group where, before disposing of a particular product, people in the group will ask if somebody else could make a use of it before throwing it away. I thought this was an incredible idea and this has since been implemented at Maytech. Ways in which this could be implemented is by adding a Slack channel for different regions where people can share, gift and trade products that they're looking to get rid of. At Maytech, this has the impact of extending our learning budgets, which is generally used for things like books. It can also reduce expenses and foster a sense of community. And the final way that we can improve is to choose sustainable suppliers. There are sustainable suppliers for everything from paper to birthday gifts and the majority of these suppliers are generally accredited B-Corp and can be found in useful directories such as the B-Corp website. I'd like to finish by saying thank you and I'd like to also show my appreciation to the GitLab commit team and thank them for encouraging me at every step of the way.