Klint: How can developers move beyond individual decisions and help make their teams more energy-efficient as well?
Tejas: Build sustainability into your CI/CD pipeline. Many existing performance tools can be integrated into CI/CD pipelines today. For example, you could use the
GreenFrame GitHub Action to check your code's carbon footprint and reject a build if the footprint is too large. More tools are in development. You can also explore new programming languages. For example,
EnerJ is a language and framework that helps developers optimize code for energy efficiency.
Arne: Green Coding Berlin also makes
a tool for analyzing the energy usage of CI pipelines themselves. We're focusing on GitHub Actions first.
Niki: I recommend looking into serverless functions and
GitOps. Serverless functions only run when they're called, so they're not sitting there wasting energy when they're not in use. GitOps, meanwhile, helps with observability and monitoring the resources running in your infrastructure. To get started with GitOps, you need to map your entire system infrastructure, so you end up with more visibility into what is running. You're less likely to lose track of things. GitOps can also help automatically turn off test infrastructure when it's not in use since it gives visibility of the desired state of your infrastructure. For example, you can create policies and labels that indicate how long different development environments need to exist. You can also use tools like
KubeGreen to automatically scale down Kubernetes resources outside of working hours in your development environment.
Developers can also advocate for sustainability in their teams and departments by pushing to include environmental sustainability in your product roadmap, your sprints, and your company's values. Again, there's a strong overlap between sustainability and cost controls. Finding and eliminating redundant workloads or unused clusters saves both money and energy.
Arne: Adding on, we’ve found that people are confused by what various metrics mean, so it can help to provide your team with easily understood metrics. We like to use the
Software Carbon Intensity specification. It offers a number that makes sense to people, like how much carbon a single API call costs. That makes it easier to reason about the impact of different products and features. You can also use these metrics in marketing. For example, if you reduce the amount of carbon a product uses, you can advertise that fact.
Klint: Any other thoughts or tips?
Arne: Here in Germany we have a sustainability certification program called Blue Angel. Its "eco-labels" generally apply to hardware and other physical products, but last year
KDE Okular became the first piece of Blue Angel–certified software. Green Coding Berlin and the
KDE Eco program are working on bringing eco-labels to more software. We have certifications and labels for other things in software, like SSL, so why not sustainability?
Niki: The Green Software Foundation is doing really interesting work in this space. They have a podcast called “
Environmental Variables,” if you want to learn more. I recommend the episode on
how legislation will impact software and sustainability, especially in Europe and the U.S., where there’s a lot happening.
Tejas: I always advocate for the use of energy-efficient devices. Also, try to fix existing devices instead of replacing them, because most of a device's carbon footprint is generated before it's ever in your hands. Finally, put some plants in your workspace to absorb CO2 while you code.