Carbon-aware Software Services through Runtime Adaptation and Time Shifting
This paper introduces Carbonshift, an open-source architectural solution that dynamically optimizes software service execution by dispatching requests across diverse implementations and time-shifting workloads to minimize carbon emissions while maintaining strict quality of service thresholds.
Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
The digital world runs on electricity, and that electricity often comes from burning fossil fuels, which releases carbon dioxide into the atmosphere. As our reliance on software grows, so does its environmental footprint. A key insight driving new research is that not all electricity is created equal. The mix of energy sources powering the grid changes constantly; sometimes the power comes from clean wind or solar, and other times it relies heavily on coal or gas. This means that running the same computer program at one time of day might produce a small amount of carbon pollution, while running it an hour later could produce significantly more, simply because the energy source has shifted. The challenge for engineers is to design software that can sense these changes and adjust its behavior to use the cleanest energy available, without making the user wait too long or accept a poor-quality result.
A team of researchers at the University of Pisa has developed a new method to help software do exactly this. They created a system that treats software tasks not as rigid, unchangeable events, but as flexible jobs that can be done in different ways at different times. Imagine a task like processing a photo or answering a question. This task can be performed with extreme precision, taking a long time and using a lot of energy, or it can be done quickly with a slightly less accurate result. The researchers call these different ways of doing the same job "flavors." Their system, named Carbonshift, acts as a smart dispatcher. It looks at a stream of incoming requests and decides two things for each one: which "flavor" of the software to use, and when to run it. It can choose to run a high-quality, energy-intensive version of a task when the grid is powered by clean energy, or it can delay a less urgent task until that clean energy arrives, rather than running it immediately on dirty power.
The researchers tested this idea by simulating a busy server receiving thousands of requests over a period of time, with the carbon intensity of the local power grid fluctuating up and down. They compared their smart system against several simpler strategies. One simple strategy was to always use the highest-quality software version, regardless of the time or energy source. Another was to always wait for the cleanest energy slot, regardless of the software version used. A third approach tried to balance the two by looking only at the current error rate or the current carbon level, but not both together. In these simulations, the researchers found that their Carbonshift system consistently produced the lowest total carbon emissions. In one specific test case involving ten requests, the simple strategies resulted in carbon emissions of roughly 0.21 or 0.15 units, whereas the Carbonshift system reduced that total to just 0.04 units. This represents a reduction of nearly 81 percent compared to the most basic approach.
Crucially, this massive drop in pollution did not come at the cost of ruining the quality of the work. The system was programmed with a rule that the average error across all tasks must stay below a certain limit, such as five percent. In every test, Carbonshift managed to keep the average error within this safe zone while still finding the most efficient times to run the tasks. The system works by grouping requests together and solving a complex puzzle to find the best combination of timing and software version. It uses a mathematical approach to ensure that if a task can wait for cleaner energy, it does, but if a task has a tight deadline, it gets done immediately, perhaps using a faster, slightly less accurate version of the software to save energy.
To prove this works in a real-world setting, the team built an open-source tool called Carbonshift and tested it with actual machine learning tasks, such as generating text, identifying names in documents, and answering questions. They ran these tasks on real computer hardware, simulating the arrival of requests and the changing carbon intensity of the grid. The results mirrored the simulations. Across different types of tasks and varying levels of acceptable error, the system consistently found a better balance than the other methods. It reduced carbon emissions significantly more than the alternatives while ensuring that the quality of the answers or text generated remained acceptable to the user. The researchers noted that the more flexibility they allowed in terms of acceptable error, the more carbon they could save, but even with strict quality requirements, the system outperformed the other methods.
This work suggests a shift in how we think about software efficiency. Instead of just trying to make code run faster or use less power in a vacuum, the focus is on making software aware of the environment it runs in. The researchers argue that by giving software the ability to adapt its behavior and its timing, we can drastically cut the carbon footprint of the digital sector. They have made their tool available to others, hoping that developers will use it to build services that naturally align with the rhythms of a greener energy grid. While the current tests were simulations and controlled experiments, the results indicate that this approach is a practical and powerful way to make computing more sustainable without sacrificing the quality of service that users expect.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.