29,99 €
Embark on a transformative journey toward sustainable software engineering, exploring the vital intersection of technology and environmental responsibility. Authored by Santiago Fontanarrosa, a Green Software Foundation member with 20+ years in software engineering, this book explores practical strategies and use cases to help you assess and mitigate digital product environmental impact.
Through real-world examples and hands-on experiences, you’ll gain the skills you need to craft environmentally responsible solutions aligned with green software engineering principles. As you progress, you’ll assess and optimize software architecture for sustainability within a sustainable software delivery framework schema. Beyond technical insights, the book delves into ethical implications and societal impacts, fostering a deeper understanding of the broader implications of technology usage.
As you approach the conclusion, you’ll have gained the ability to comprehend, measure, and craft energy-efficient digital solutions aligned with green software engineering principles.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 307
Veröffentlichungsjahr: 2024
Green Software Engineering
Exploring Green Technology for Sustainable IT Solutions
Santiago Fontanarrosa
Copyright © 2024 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Group Product Manager: Kunal Sawant
Publishing Product Manager: Samriddhi Murarka
Senior Content Development Editor: Rosal Colaco
Book Project Manager: Prajakta Naik
Technical Editor: Rajdeep Chakraborty
Copy Editor: Safis Editing
Indexer: Hemangini Bari
Production Designer: Vijay Kamble
DevRel Marketing Coordinator: Shrinidhi Manoharan
First published: June 2024
Production reference: 1280624
Published by Packt Publishing Ltd.
Grosvenor House
11 St Paul’s Square
Birmingham
B3 1RB, UK
ISBN 978-1-83588-588-8
www.packtpub.com
To my wife, Marie, and my children, Thiago and Catalina. May this work contribute to a more sustainable world for you and future generations.
– Santiago Fontanarrosa
Santiago Fontanarrosa, boasting over 20 years in software engineering, is the VP of Technology at Globant and a member of the Green Software Foundation. He holds a master’s degree in computer science. Renowned for leading digital transformations in various industries, his broad expertise in software engineering has been pivotal. A strong advocate for sustainable technology, Santiago has been key in developing ‘Green IT training’ at Globant, promoting ‘Digital Sobriety’ in software development. His contributions extend to integrating sustainability in technology, aiming for Sustainable Digital Solutions.
Fabian Brünger is a seasoned Software, DevOps, and Cloud Engineer with a robust background in hardware. Currently, he is a Solution Architect at RedoxOne, where he focuses on the solution architecture for RedoxFlow battery technology, spanning software architecture to Azure cloud architecture. Fabian’s technical expertise is anchored in his proficiency with Rust, which he has leveraged to develop real-time systems and multi-threaded services, as well as his comprehensive skills in Azure cloud services, CI/CD pipelines, and DevOps strategies.
Fabian holds a Master of Engineering in Electrical and Computer Engineering from FH Dortmund, with a focus on digital circuit development, RISC-V, and bare metal programming, and a Bachelor of Science in Environment & Energy from Hochschule Rhein-Waal. He is proficient in multiple programming languages and tools, including Rust, Python, Docker, Kubernetes, Terraform, and various Azure services. In addition to his technical skills, Fabian is actively engaged in Green Software Engineering and open-source communities.
Welcome to “Green Software Engineering,” a transformative journey into the intersection of technology and environmental responsibility.
In this book, you’ll explore practical strategies and real-world use cases that will enable you to assess and mitigate the environmental impact of digital products. As you delve into the content, you will gain valuable skills for optimizing software architecture within a sustainable software delivery framework schema.
Beyond the technical aspects, this book also addresses the ethical implications and societal impacts of technology usage, fostering a deeper understanding of the broader consequences of our digital actions. By the end of this journey, you will have the ability to comprehend, measure, and create energy-efficient digital solutions that align with green software engineering principles.
Throughout this book, you will discover practical strategies for developing energy-efficient digital solutions across various domains. You will learn how to effectively measure and mitigate the environmental impact of digital solutions by integrating sustainable design patterns into the software development cycle. The book provides insights on optimizing software and infrastructure for sustainability, incorporating green software principles into the Agile Software Development Life Cycle, and exploring emerging trends and technologies shaping the future of green software engineering.
Additionally, you will reflect on the ethical considerations and societal concerns related to technology, understanding the importance of industry standards and reporting methodologies for software emissions. You will also learn how to measure the environmental footprint of digital operations using various methodologies and mitigate the ecological impact of software with strategic approaches.
As you embark on this journey, we encourage you to embrace the ethos of sustainability and environmental responsibility. Our goal is to inspire you to not only adopt green software engineering practices but also to become a catalyst for positive change within your organization and the broader tech community. By mastering the principles outlined in this book, you’ll be equipped to create a sustainable future through responsible technology usage.
Join us on this path towards a greener, more sustainable digital world.
If you’re a software developer, software architect, or IT professional who wants to integrate sustainability into your organization, this book is for you. Whether you’re a seasoned professional or a sustainability-focused tech enthusiast, this book provides the knowledge and tools you need to drive positive change in the software industry. A basic understanding of IT concepts and programming is recommended, and familiarity with modern digital technologies like cloud computing will also be helpful.
Chapter 1, Digital Carbon Footprint, links software’s impact to climate change, establishing the relationship between energy consumption and software development. It introduces the “Digital Carbon Footprint” as a metric for quantifying carbon emissions from digital activities. It provides a technical understanding of how software contributes to climate change and establishes the foundations of how to assess the environmental impact of digital operations.
Chapter 2, Sustainable Software Engineering and Digital Sobriety Principles, introduces the foundational principles underpinning the book’s technical framework, encompassing methodology and practical examples. It delineates the core principles of sustainable software engineering and the fundamental pillars of the Digital Sobriety methodology. In examining the principles guiding software development, it emphasizes minimizing environmental impact, optimizing energy efficiency, and fostering responsible resource usage.
Chapter 3, Green Architecture and Measuring Impact, explores methodologies, software design patterns, and practical strategies designed to improve the energy efficiency of software applications, thereby reducing their overall carbon footprint. The chapter presents design patterns that align with the green software principles. The chapter also provides essential tools and techniques to proficiently measure the environmental impact of digital solutions, fostering a comprehensive understanding of how to quantify and effectively mitigate the ecological footprint associated with software development and usage.
Chapter 4, User Experience and Design, explores the intersection of user experience (UX), design, and green coding. It critically examines how minimalist UI design can optimize energy efficiency, and how UX can foster energy-conscious user behavior. It further discusses the value of responsive design in adaptability to various devices, optimizing energy utilization, and enhancing the overall user experience in the paradigm of sustainable software development.
Chapter 5, Algorithms and Programming Languages, extensively examines the implications outlined in previous chapters, offering concrete examples and implementation strategies. It explores essential tools and best practices for constructing digital products. It analyzes the energy efficiency of different programming languages, emphasizing the importance of considering sustainability alongside traditional performance metrics. Additionally, it explores how to integrate environmentally sustainable practices within software development.
Chapter 6, Development and Testing, delves into methodologies, coding practices, and testing strategies aimed at enhancing the sustainability of software applications. This chapter focuses on implementing green coding practices and digital sobriety to ensure web and mobile applications are energy efficient. It explores best practices for backend services development, targeting the energy efficiency of data-consuming applications. This chapter concludes by emphasizing the critical role of sustainable testing, outlining strategies for automation and performance testing to identify and reduce the impact of resource-intensive components. By integrating these practices, this chapter aims to foster a comprehensive understanding of creating and maintaining eco-friendly software solutions.
Chapter 7, Infrastructure and Deployment, concentrates on the essential elements of deploying, running, and monitoring sustainable software. It encompasses strategies to optimize infrastructure, minimizing energy consumption and carbon footprint. The emphasis lies on efficient resource allocation, scalability considerations, and the integration of green engineering practices within the infrastructure. This ensures a sustainable deployment, running, and monitoring process in alignment with green engineering principles. It also explores the best practices in designing and operating environmentally friendly data centers.
Chapter 8, Data Management, explores the efficient practices for data management and AI model training, highlighting resource conservation, reduced storage, and faster execution. The chapter provides insights to decrease energy consumption, promoting environmentally conscious coding to mitigate the carbon footprint.
Chapter 9, Sustainable Software Delivery Framework, explores the integration of green software principles discussed throughout the book into the Agile Software Development Life Cycle (SDLC). It investigates the advantages of early adoption of best practices, emphasizing energy-efficient coding, optimized and energy-efficient algorithms, and prudent use of cloud services to minimize the environmental footprint of digital products and services within organizational frameworks.
Chapter 10, Regulations, Standards, and Future Perspectives, explores current industry standards and methodologies for reporting software carbon emissions, emphasizing the alignment of software practices with environmental standards and legal requirements. It also envisions the future of green software engineering, highlighting policy developments, emerging trends, and anticipated challenges. By emphasizing the importance of environmental considerations in software development, it underscores the need to stay proactive and adaptive in a rapidly evolving, digital, and climate-conscious world.
Software/hardware covered in the book
Operating system requirements
Python 3.9.16 or above
Windows, macOS, or Linux
Node.js (version 14 or later)
Windows, macOS, or Linux
Rancher or Docker
Windows, macOS, or Linux
Green Metrics Tool (0.24)
Windows, macOS, or Linux
Git
Windows, macOS, or Linux
If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.
You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Green-Software-Engineering. If there’s an update to the code, it will be updated in the GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
There are a number of text conventions used throughout this book.
Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “A request is made to the /data/paginated endpoint, which retrieves the first 10 records.”
A block of code is set as follows:
services: gse-api: log-stdout: True read-sci-stdout: TrueAny command-line input or output is written as follows:
cd <gtm-install-folder> source venv/bin/activate python3 runner.py --uri <full path to gsi-api-test directory> --name gsi-api-test --docker-prune --allow-unsafeBold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Select the Page Metrics dashboard to view the collected metrics.”
Tips or important notes
Appear like this.
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, email us at [email protected] and mention the book title in the subject of your message.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.
Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Once you’ve read Green Software Engineering, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.
Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.
Thanks for purchasing this book!
Do you like to read on the go but are unable to carry your print books everywhere?
Is your eBook purchase not compatible with the device of your choice?
Don’t worry, now with every Packt book you get a DRM-free PDF version of that book at no cost.
Read anywhere, any place, on any device. Search, copy, and paste code from your favorite technical books directly into your application.
The perks don’t stop there, you can get exclusive access to discounts, newsletters, and great free content in your inbox daily
Follow these simple steps to get the benefits:
Scan the QR code or visit the link belowhttps://packt.link/free-ebook/9781835885888
Submit your proof of purchaseThat’s it! We’ll send your free PDF and other benefits to your email directlyIn this part, you’ll delve into the environmental implications of software development and usage. We’ll start by examining the digital carbon footprint, highlighting how digital activities contribute to global emissions. Then, we’ll introduce the principles of sustainable software engineering and digital sobriety, providing foundational knowledge on reducing the environmental impact of software.
This part contains the following chapters:
Chapter 1, Digital Carbon FootprintChapter 2, Sustainable Software Engineering and Digital Sobriety PrinciplesIn today’s digital era, the environmental implications of software development and digital operations have become a significant concern. As we increasingly rely on digital solutions, the adverse environmental effects of these operations are also amplifying. Throughout this book, we will explore the impact of software on climate change, establishing a link between energy consumption and software development. Our ultimate aim is to deepen our understanding of how software contributes to climate change and lay the groundwork for assessing the environmental impact of digital operations.
In this chapter, we will cover the following main topics:
The environmental implications of digital operations and their adverse effects on the environmentHow energy consumption can serve as a proxy for measuring the environmental impact of digital activitiesThe concept of the “digital carbon footprint,” a crucial metric for quantifying carbon emissionsClimate change is an urgent and pressing issue that poses significant threats to global ecosystems, human health, and socio-economic structures. Its most visible manifestation is global warming, which has seen our planet’s average surface temperature rise by approximately 1.18 degrees Celsius (about 34 degrees Fahrenheit) since the late 19th century. This alarming change is primarily driven by the surge in atmospheric carbon dioxide (CO2) emissions, a key greenhouse gas responsible for climate change [0].
The understanding of humanity’s impact on Earth’s climate traces back to the late 19th century when scientists first hypothesized that the burning of fossil fuels might elevate atmospheric CO2 levels and global temperatures. However, it wasn’t until the mid-20th century that the science of climate change gained widespread recognition. In 1958, Charles David Keeling established the Keeling Curve [11], an unbroken record of atmospheric CO2 concentrations measured at the Mauna Loa Observatory in Hawaii.
Figure 1.1 – Keeling Curve (http://doi.org/10.6075/J08W3BHW)
The Keeling Curve charts the ongoing rise of atmospheric CO2 concentrations measured at the Mauna Loa Observatory in Hawaii. This continuous record is significant because it correlates closely with fossil fuel usage data over the same period. Historical data shows a parallel increase in fossil fuel consumption and atmospheric CO2 levels, underscoring the connection between human activities, particularly the burning of fossil fuels, and the greenhouse effect that drives global warming. This relationship is further supported by isotopic analyses of atmospheric CO2, which distinguish CO2 originating from fossil fuels from other sources, providing a clear chemical signature of human influence on the atmosphere. The correlation between the rise in CO2 captured by the Keeling Curve and the increase in global temperatures forms a foundational piece of evidence for understanding human-driven climate change.
Various industrial sectors contribute significantly to carbon emissions and climate change, including transportation, agriculture, and manufacturing:
Transportation: This sector, encompassing cars, trucks, ships, and airplanes, accounts for a substantial portion of global CO2 emissions. Transitioning to electric vehicles and adopting sustainable transportation practices is imperative to mitigate its impact.Agriculture: Agriculture is a major contributor to greenhouse gas emissions through activities such as deforestation, livestock production, and methane emissions from rice paddies. Implementing sustainable farming practices and reducing food waste are vital steps toward climate resilience.Manufacturing: The manufacturing industry, responsible for consumer goods and industrial equipment production, can decrease its carbon footprint by adopting energy-efficient processes and materials recycling.Here is a diagram showing the global greenhouse gas emissions by sector (as of September 18, 2020):
Figure 1.2 – Global greenhouse emissions by sector, as of September 18, 2020
As we can observe, the consequences of climate change are far-reaching and affect both natural and human systems. These include the following:
More frequent and severe weather events, such as hurricanes, droughts, and wildfiresThe melting of polar ice caps, resulting in rising sea levels that threaten coastal communities worldwideThe endangerment of numerous species, disrupting ecosystems and biodiversityDisruptions in agriculture, water resources, and human health, jeopardizing the well-being of billionsEfforts to combat climate change have been underway for decades and have significantly gained momentum in recent years, with notable developments including the following:
The Paris Agreement (2015): This is an international treaty signed by 196 countries, committed to limiting global warming to well below 2 degrees Celsius above pre-industrial levels, with a target of 1.5 degrees Celsius. The agreement underscores the need for nations to reduce carbon emissions and transition to renewable energy sources [12].The renewable energy revolution: The rapid growth of renewable energy sources, such as solar and wind power, has played a pivotal role in reducing carbon emissions. Countries and companies are increasingly investing in clean energy solutions.Sustainable practices: Industries worldwide are adopting sustainable practices to reduce their carbon footprint. These encompass energy-efficient manufacturing processes, sustainable agriculture, and responsible forestry practices.Technological innovation: Advanced technologies, including electric vehicles, carbon capture and storage, and energy-efficient building designs, are helping reduce carbon emissions across various sectors.While these global efforts are crucial, it’s essential to recognize that the traditional contributors (as mentioned previously) are not the sole generators of CO2 emissions. In fact, our increasingly digitized world presents another often-overlooked contributing factor: digital activities.
In the upcoming section, we will delve deeper into the environmental impact of digital activities and strategies to reduce carbon emissions across various sectors. Our aim is not only to understand the significance of software’s role in climate change but also to provide actionable insights for creating a more sustainable future.
Digital activities have become an integral part of our daily lives. In the Information and Communication Technology (ICT) sector, activities such as software development, data centers, and the use of digital devices are on the rise. As we increasingly rely on digital solutions, it’s crucial to understand the environmental implications of this digital surge.
But how exactly do we measure this impact? How can we determine the total digital emissions? In a world where information flows ceaselessly and data centers hum with activity, quantifying the environmental impact of our digital lives is a complex challenge.
Consider the following facts:
The digital world’s contribution to humanity’s carbon footprint is staggering, estimated to represent approximately 4% of primary energy consumption and greenhouse gas emissions. This figure continues to climb as we embrace more digital technologies and services [1][2].Video streaming has seen exponential growth. With platforms such as Netflix, YouTube, and Amazon Prime Video, we now stream more content than ever before. Video streaming, with its high-definition content and 4K resolutions, is a major contributor to global data traffic, accounting for a whopping 75% of the total [4].The impact of enterprise IT infrastructure has also expanded. As businesses adopt more digital processes, the carbon footprint of their IT operations grows. By 2025, the carbon footprint of enterprise IT is projected to be equivalent to the emissions produced by driving a staggering 463 million passenger vehicles for an entire year [3].Even seemingly small digital actions have an environmental cost. As of November 2020, it was estimated that an hour of streaming video emits, on average, 36 grams of CO2. This fact highlights the carbon emissions associated with our everyday digital activities, especially video streaming, which has become a common pastime [5].
However, measuring the exact carbon footprint of these digital activities remains a complex task. Unlike traditional industries where emissions can be readily measured using more direct monitoring, the digital realm presents unique challenges. Many aspects of digital operations, such as cloud services, may not be under our direct control or access, making it difficult to quantify their environmental impact accurately.
So, how can we navigate this complexity to truly understand and mitigate our digital emissions?
Throughout the book, we will delve deeper into the digital world’s impact on our environment and explore practical strategies for reducing the carbon footprint associated with our digital activities and promoting sustainability within the realm of software development and beyond. These strategies are crucial as we seek to strike a balance between our ever-expanding digital capabilities and the urgent need to protect our environment for future generations.
If you can't measure it, you can't improve it.
- Peter Drucker
When it comes to measuring carbon emissions for digital services and products, the task at hand involves more than just tallying numbers. It requires a clear understanding of what precisely needs to be measured. The challenge lies in establishing the boundaries of our measurement – deciding what factors to include or exclude in our calculations.
In the world of environmental accounting, the concept of “boundary” refers to the scope of emissions that an organization or system aims to account for. This is where the GHG Protocol [13], a widely recognized standard, comes into play. The GHG Protocol provides guidelines for organizations to measure and manage their greenhouse gas emissions.
Within the protocol, emissions are categorized into three scopes:
Scope 1: These are direct emissions that originate from sources owned or controlled by the organization. In the digital context, this might include emissions from on-site data centers, company-owned servers, and software development processes. These emissions are relatively easier to measure as they occur within an organization’s direct control.Scope 2: These emissions are indirect and result from purchased electricity, heat, or steam used by the organization. If a company uses electricity generated from fossil fuels to power its data centers or offices, the associated emissions fall under Scope 2.Scope 3: These emissions encompass a broad range of indirect emissions that occur as a result of an organization’s activities but are not directly owned or controlled by that organization. For digital services and products, Scope 3 emissions may include the embodied carbon associated with the manufacturing and disposal of user devices, emissions from cloud services, and even emissions related to user behaviors, such as online video streaming and web browsing.Figure 1.3 – GHG – Scopes
The carbon footprint of a digital product isn’t limited solely to operational emissions, which fall under Scopes 1 and 2. It also extends to embodied carbon, a concept often overlooked but vital to achieving a comprehensive understanding of environmental impact.
When we think of measuring carbon emissions from sources such as airplanes, cars, and factories, we conjure images of visible smoke or gases being released into the atmosphere. In these cases, we can deploy sensors or conduct controlled tests to quantify emissions, yielding tangible and measurable results.
Using the GHG Protocol for digital services can be challenging due to several reasons:
Embodied carbon: Calculating the embodied carbon associated with digital products is intricate. It requires assessing the emissions produced during the manufacturing and disposal of user devices, which can involve multiple stages of the supply chain and product life cycle.Dynamic infrastructure: Digital services often operate in dynamic environments where infrastructure scales up or down based on demand. This variability can make it challenging to track and measure emissions accurately, especially in real-time.Third-party services: Many digital services rely on third-party applications, platforms, or services that may not provide emissions data. This lack of transparency can hinder efforts to account for emissions accurately.Standardization: The absence of standardized methodologies for measuring digital emissions can make it difficult to compare emissions across different organizations or industries.Despite these challenges, efforts are ongoing to develop methodologies and tools that can help digital service providers and organizations better measure and manage their carbon emissions. As the digital sector continues to grow, addressing these challenges is crucial to reducing its environmental impact and promoting sustainability.
Note
A Carbon Proxy is a measure or indicator that represents the carbon footprint or environmental impact of a particular activity, process, or product. For instance, in the context of streaming, a good carbon proxy might be a metric that provides an estimate of the carbon emissions associated with one hour of streaming.
Within the intricate landscape of digital operations, encompassing software development, data storage, and device utilization, a recurring factor prevails: energy consumption. Digital activities, whether revolving around the relentless operation of cloud servers fueling applications and websites or the power essential to device functionality, inherently entail energy overheads.
In this context, it becomes increasingly evident that energy consumption serves as a pragmatic and technically measurable metric for gauging the environmental footprint of digital endeavors. This is concisely stated as follows:
Energy Consumption
Energy consumption directly impacts the environmental footprint of digital operations, with the impact largely determined by the carbon intensity of the electricity source.
This principle highlights a critical technical path: as we delve into the realm of monitoring and enhancing the energy efficiency of our sustainable pursuits, we employ a dual-pronged approach:
The optimization of energy efficiency reduces the overall energy consumption.The selection of cleaner energy providers ensures that the energy consumed has a lower carbon intensity.These complementary actions not only mitigate energy usage but also contribute to a reduced environmental footprint. Yet, a fundamental technical challenge remains:
How can we relate the energy consumption of our products and services to the actual emissions being generated?
This critical inquiry leads us to the following section, where we will introduce the concept of the digital carbon footprint. Significantly, we will underscore its pivotal role in quantifying the environmental impact of our digital activities, thereby enabling informed technical decisions grounded in precise insights.
With energy defined as our carbon proxy, we can now more clearly understand how to measure the emissions generated by our software.
Digital Carbon Footprint
This term refers to the total amount of carbon emissions equivalent to the energy consumed throughout the life cycle of digital goods and services.
This definition has now become our pivotal metric for estimating carbon emissions from digital activities, providing a tangible measure to aid us in understanding and mitigating the environmental impact of our digital operations. However, quantifying the digital carbon footprint presents additional challenges, primarily due to the metric’s reliance on the carbon intensity of electricity.
To contextualize this, it’s beneficial to compare it with “traditional” carbon footprint measurements. Unlike the more direct emissions from transportation or manufacturing, the digital carbon footprint is linked to the energy sources powering digital infrastructure. This necessitates a nuanced approach, as carbon intensity varies widely across different energy sources, from renewable energies such as wind and solar, which have a lower carbon intensity, to fossil fuels such as coal and natural gas, which are more carbon-intensive. Understanding this distinction is crucial to accurately assessing and reducing the digital carbon footprint.
Throughout the book, our discussion will focus primarily on operational emissions, sidestepping the calculation of embodied carbon, which necessitates a separate strategy for quantification. In upcoming chapters, we will explore standards that aid in defining the procedures for measuring and reporting the emissions being measured.
Electricity production often relies on fossil fuels or other methods that contribute to carbon emissions. The carbon intensity of electricity refers to the amount of CO2 emissions produced per unit of electricity generated. It’s a key metric in assessing the environmental impact of a region’s or power grid’s energy generation.
Typically measured in grams or kilograms of CO2 emitted per kilowatt-hour (gCO2/kWh or kgCO2/kWh) of electricity produced, this metric helps evaluate how clean or carbon-intensive the energy generation mix is in a specific area. However, this figure varies across different electricity grids worldwide due to the diverse mix of clean and dirty electricity sources. Additionally, this number fluctuates over time, meaning that every minute in each region has a different carbon intensity.
This variability poses a question: Which of these figures should we use when calculating our digital carbon footprint?
We can be tempted to choose a global yearly average, but this will ensure that any effort to run applications in regions with cleaner electricity won’t reflect the actual improvements in our results. On the other hand, we can choose to incorporate real-time regional metrics in our calculation, but yet again, we will be facing a new predicament: if we implement a code change and observe changes – an increase, for example – was this the result of our actions or was it because the grid at that point became dirtier?
Another example, that may lead to incorrect results, is if we have an energy-intensive workload that can shift to times and regions when and where electricity is cleaner, this will lead us to conclude that the impact is less when it is not the actual case. We are faced now with the fact that there is no “silver bullet,” since each approach presents its own benefits and drawbacks. By choosing average figures, we lose the fine granularity, but if we choose real-time metrics, we may encounter false positives.
Moving forward, it is vital to maintain our primary objective, which is to establish a quantifiable measure for our selected metric and concentrate on the process of perpetually refining that metric through continuous monitoring and actions. While it is advantageous to attempt to model the overall carbon footprint of an application, it is crucial to comprehend how that figure is calculated and the assumptions made.
Let’s employ emails as an example to illustrate our intent. According to various estimates, the average amount of CO2 generated by a standard email is about 4 grams [6]. Extrapolating these figures, we can establish the following equivalences:
Email activity (billions) [7]
CO2 (tons) [6]
Flights from LAX-LON [9]
Acres of U.S. forests sequestering CO2 [8]
2022: 333.2 x day
1,332,800
585,331
1,589,388
2023: 347.3 x day
1,389,200
610,101
1,656,646
Increase
56,400
24,770
67,258
Table 1.1 – Average amount of CO2 generated by a standard email
To offset this increase in CO2, it would require a U.S. forest equivalent to the size of Washington, D.C. to sequester the additional carbon. Given the lengthy maturation process of trees, accomplishing such a task within a single year becomes unattainable.
To ascertain the impact of our digital actions, let’s assume that we request each person to reduce the number of emails they send by 5%. This reduction would result in the following:
Email activity (billions) [7]
CO2 (tons) [6]
LAX-LON (one trip) [9]
Acres of U.S. forests sequestering CO2 [8]
2023: 333.2 x day
1,389,200
610,101
1,656,646
2023: if we have reduced email by 5% x day
1,319,740
579,596
1,573,814
Tons of CO2 saved
69,460
30,505
82,832
Table 1.2 – Reducing the number of emails by 5%
This minor action per person corresponds to avoiding the emission of 25.35 million tons of CO2 annually. For perspective, the global per capita CO2 emissions averaged 4.66 metric tons in 2022 [10].
As we can observe in the example, in the digital landscape, energy optimization assumes paramount importance, presenting a unique opportunity to achieve substantial reductions in carbon emissions without any direct release of CO2 into the atmosphere. What distinguishes this endeavor is its inherent scalability, where even minute refinements in our digital workflows can yield remarkable environmental advantages. By optimizing energy efficiency, we not only reduce our carbon footprint but also contribute to the global effort in combatting climate change.
The butterfly effect
"When a butterfly flutters its wings in one part of the world, it can eventually cause a hurricane in another" - Edward Loren
While this example has been simplified and may contain marginal errors, as technology and methodology continue to evolve, more accurate methods and metrics will emerge. What is crucial to emphasize is the need to start somewhere and focus on the incremental process to generate a decreasing trajectory, acknowledging there may be a margin of error in our metrics.
Just as a butterfly’s wings, seemingly insignificant, can set off a chain reaction leading to significant weather changes, refraining from sending a single email might appear trivial. However, if we collectively choose to minimize our digital actions, the cumulative effect can be monumental. By reducing the associated CO2 emissions, this small action becomes a ripple that, if embraced globally, can create a multiplier effect for the benefit of the entire planet.
In the following chapters, we will continue exploring the methodologies and frameworks that will then allow us to start working out and implementing concrete actions to implement what we have been discussing.