Building Green Software: A Sustainable Approach to Software Development and Operations 9781098150624

How will software development and operations have to change to meet the sustainability and green needs of the planet? An

115 15 5MB

English Pages 200 Year 2024

Report DMCA / Copyright

DOWNLOAD FILE

Building Green Software: A Sustainable Approach to Software Development and Operations
 9781098150624

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

Polecaj historie