Building Green Software

Book description

How will software development and operations have to change to meet the sustainability and green needs of the planet? And what does that imply for development organizations? In this eye-opening book, sustainable software advocates Anne Currie, Sarah Hsu, and Sara Bergman provide a unique overview of this topic—discussing everything from the likely evolution of national grids to the effect those changes will have on the day-to-day lives of developers.

Ideal for everyone from new developers to CTOs, Building Green Software tackles the challenges involved and shows you how to build, host, and operate code in a way that's not only better for the planet but also cheaper and relatively low-risk for your business. Most hyperscale public cloud providers have already committed to net-zero IT operations by 2030. This book shows you how to get on board.

You'll explore:

  • How the energy transition is likely to change hosting on prem and in the cloud—and how your company can prepare
  • The fundamental architectural principles of sustainable software development and how to apply them
  • How to determine which parts of your system need to change
  • The concept of extending hardware longevity and the part that software plays

Publisher resources

View/Submit Errata

Table of contents

  1. Foreword
  2. Preface
    1. Why Should You Read This Book?
    2. How Does This Book Work?
    3. Why Do Techies Matter?
    4. The Culprits
    5. What Won’t We Talk About?
    6. Says Who?
    7. Why Can’t You Trust Us?
    8. Conventions Used in This Book
    9. O’Reilly Online Learning
    10. How to Contact Us
    11. Acknowledgments
      1. Anne
      2. Sarah
      3. Sara
  3. 1. Introduction to Green Software
    1. What Does It Mean to Be Green in IT?
    2. What We Reckon
  4. 2. Building Blocks
    1. The Reason We Are Here: Carbon
      1. Greenhouse Gases
      2. Weather Versus Climate
      3. How About Global Warming? How Is It Related to Climate Change?
      4. Monitoring Climate Change
    2. Back to Basics: Electricity
      1. Work, Energy, Electricity, and Bills
      2. High- and Low-Carbon Energy
      3. How Can We Improve Energy Efficiency?
    3. Hardware 101 for Software Engineers
      1. The Physical Side
      2. The Operations Side
    4. You’re All Set
  5. 3. Code Efficiency
    1. Efficiency Is Everything—or Is It?
    2. What Is Code Efficiency?
      1. Why Is Most Code Deliberately Inefficient?
      2. The Benefits of Efficiency
      3. Developer Productivity
    3. Background: Hyperefficient Code
      1. The Goodies
      2. Performance Versus Efficiency Versus Greenness
    4. Pick the Right Platform
    5. Use Green Design Patterns
      1. Avoid Too Many Layers
      2. Be Mindful with Microservices
      3. Replace Inefficient Services and Libraries
      4. Don’t Do or Save Too Much
      5. Leverage Client Devices
      6. Manage Machine Learning
      7. The Big Problem with Efficiency
    6. The Lowdown
  6. 4. Operational Efficiency
    1. The Battle Against the Machines
      1. Hot Stuff
      2. Techniques
      3. Machine Utilization
      4. Multitenancy
      5. Serverless Services
      6. Hyperscalers and Profit
      7. SRE Practices
      8. LightSwitchOps
      9. Location, Location, Location
      10. Oh No! Resistance Fights Back!
      11. Green Operational Tools and Techniques
  7. 5. Carbon Awareness
    1. Carbon Intensity of Electricity
      1. Variability of Carbon Intensity
      2. Electricity Demand
      3. Tooling
    2. Demand Shifting
      1. Time Shifting
      2. Location Shifting
    3. Demand Shaping
    4. Any Devil’s Advocates?
      1. Location Shifting Can Be Tricky
    5. Real-World Examples
      1. Google
      2. Xbox
      3. iPhone
      4. Carbon Hack 22
    6. You’re Carbon and Aware
  8. 6. Hardware Efficiency
    1. Embodied Carbon
      1. Device Longevity
      2. Software-Defined Obsolescence
      3. Cloud Applications and Services
      4. Self-Hosted Data Centers
      5. Specialized Hardware
    2. E-waste
      1. What Are Hardware Producers Doing to Make Their Operations Greener?
    3. That Is a Wrap!
  9. 7. Networking
    1. Are Networks Already Green Enough?
      1. Looking at the Big Picture
    2. Defining the Internet
      1. What Are These Wires?
      2. How Do Compute and Storage Fit In?
      3. More Than the Sum of Its Parts?
      4. Are Internet Satellites Good or Bad?
    3. The Role of Software
    4. Why Can’t We Just Make Routing Greener?
      1. Border Gateway Protocol
    5. Greening the Internet from the Top Down
      1. Lessons from Lockdown
      2. Demand Shifting
      3. Brownouts, Graceful Downgrades, and Demand Shaping
    6. So, What Did We Learn from 2020?
    7. In Conclusion
  10. 8. Greener Machine Learning, AI, and LLMs
    1. Growth in Size and Usage
    2. Project Planning
    3. Data Collection
    4. Design and Training of ML Models
      1. Size Matters
      2. Size Isn’t All
    5. Deployment and Maintenance
    6. Where Should You Start?
  11. 9. Measurement
    1. The Perfect
      1. Perfect Energy Data
      2. Perfect Carbon Intensity Data
      3. Where Do Market-Based Reductions Fit In?
      4. Perfect Embodied-Carbon Tracing
      5. The Future of Perfect Monitoring
    2. The Good Enough?
      1. Use of Proxies
      2. Consistent Use of Imperfect Data to Reach Reductions
    3. Examination of the Current Methodologies
      1. Greenhouse Gas Protocol (GHG Protocol)
      2. Green Software Foundation’s Software Carbon Intensity Specification (SCI)
      3. ISO 14064 Standard
    4. Available Tooling
      1. Hyperscale Cloud Provider Tools
      2. Open Source Options for the Cloud
      3. Client-Side Tooling
    5. You Made It!
  12. 10. Monitoring
    1. Availability as a North Star
    2. Four Horsemen of Metrics-Based Monitoring
    3. Service Level Is Why We Are Here
      1. When a Carbon Metric Is Ready
    4. Observability
      1. The Anticipated Showdown: Observability Versus Monitoring
      2. Are We Ready for Observability?
    5. We Will Get There
  13. 11. Co-Benefits
    1. Is It About the Money?
      1. Why Is Greener Also Cheaper?
    2. How About Reliability and Resilience?
      1. Example
    3. Maybe It’s Performance?
      1. How Fast Is Fast Enough?
      2. Best Fit and Performance
    4. It’s Got to Be Security!
      1. Security Is Green
    5. But What About Data?
      1. Control LLMs
      2. Think About Data Models
    6. Actually, It’s All of the Above
    7. Right, We Think You’re Ready
  14. 12. The Green Software Maturity Matrix
    1. The History of Maturity Matrices
    2. Green Software Maturity Matrix
      1. Levels
      2. Axes
      3. Axes Checklists
    3. Where Are We Today?
  15. 13. Where Do We Go from Here?
    1. Why Us?
    2. Moving Through the Matrix
      1. The Green Software 50% Challenge
      2. What Next?
      3. To Everything There Is a Season
    3. The Cost?
    4. “All the Things!”
    5. Then How?
      1. Code Reuse
    6. So, What Is Green Software?
    7. Epilogue
  16. Index
  17. About the Authors

Product information

  • Title: Building Green Software
  • Author(s): Anne Currie, Sarah Hsu, Sara Bergman
  • Release date: March 2024
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781098150624