Carbon Containers: A System-level Facility for Managing Application-level Carbon Emissions

John Thiede, Noman Bashir, David E. Irwin, Prashant J. Shenoy · DOI

Abstract

To reduce the environmental impact of cloud computing, datacenters are increasingly focused on optimizing application carbon-efficiency—the amount of work performed per unit of carbon emitted. We present Carbon Containers, a system-level facility that automatically regulates application carbon emissions in response to fluctuations in both workload intensity and grid carbon intensity. By extending the concept of power containers, Carbon Containers allow applications to specify a maximum carbon emission rate (g·CO2e/hr). The system enforces this rate through a combination of vertical scaling, container migration, and suspend/resume mechanisms. Our evaluation using a Linux Container (LXC) prototype and real-world traces from Microsoft Azure and electricityMap demonstrates that Carbon Containers improve carbon-efficiency and performance compared to traditional temporal shifting strategies, particularly in regions with high average carbon intensity and low variability.

Introduction

As cloud computing scales, hardware efficiency alone is no longer sufficient to offset the industry's growing carbon footprint. Current "carbon-aware" strategies primarily rely on temporal shifting (delaying jobs) or spatial shifting (moving jobs to greener regions). However, these approaches face significant hurdles:

  1. Interactive Requirements: Many services (e.g., web servers) cannot be suspended without violating service-level agreements.
  2. Regional Constraints: In many high-carbon regions, the grid intensity is consistently high with little variation, leaving no "green" window to wait for.
  3. Workload Volatility: Application demand often changes much faster than the carbon intensity of the power grid, yet most systems only react to the latter.

Carbon Containers address these gaps by providing a transparent, system-level mechanism to "rate-limit" carbon emissions, allowing applications to continue running under a strict carbon budget.

System Design and Mechanisms

We implemented LXCC (Linux Carbon Containers), which integrates carbon management directly into the OS kernel and container runtime. The system employs three primary levers to maintain a user-defined carbon cap:

1. Vertical Scaling

Using Linux cgroups, LXCC dynamically adjusts the CPU cores and time slices allocated to a container. By throttling resource usage, the system directly reduces the power draw and, consequently, the carbon emission rate.

2. Intra-Datacenter Migration

One of the critical insights of this work is the "baseload problem." Servers are not perfectly energy-proportional; a server idling at 0% utilization can still consume up to 50% of its peak power. When an application is heavily throttled on a large server, it becomes more carbon-efficient to migrate it to a smaller server with a lower baseload power. LXCC uses CRIU (Checkpoint/Restore in Userspace) to move containers between server tiers to optimize this efficiency.

3. Suspend/Resume

If the carbon target cannot be met even on the smallest available hardware tier, the system employs suspend/resume as a last resort. This ensures the carbon cap is never breached, even during extreme peaks in grid intensity.

LXCC supports two primary policies: Energy-Efficiency, which seeks to minimize total carbon regardless of the budget, and Performance, which utilizes the full carbon budget to maximize throughput and maintain a buffer for workload bursts.

Evaluation

We evaluated LXCC using a combination of:

  • Workload Traces: 30 days of production data from ~2.7 million Microsoft Azure VMs.
  • Carbon Data: Real-time intensity data from electricityMap across 27 regions, representing high variability (California), medium variability (Netherlands), and low variability/high intensity (Poland).

Key Findings

  • Efficiency Gains: Compared to "WaitAWhile" (a state-of-the-art temporal shifting policy), Carbon Containers achieved similar carbon reductions with significantly less performance degradation. By scaling down rather than shutting off, applications maintained higher availability.
  • Resilience in "Dirty" Grids: In regions like Poland, where carbon intensity is high and flat, traditional shifting fails because there is no better time to run. Carbon Containers succeeded by right-sizing the application to fit the available carbon budget.
  • The Importance of Migration: The ability to migrate to smaller hardware tiers proved essential. It allowed applications to lower their "carbon floor"—the minimum emissions required just to keep the container active—providing much-needed flexibility during high-intensity periods.

Limitations and Future Work

While Carbon Containers provide a robust framework for operational carbon management, several areas remain for future exploration:

  • Hardware Heterogeneity: The current prototype assumes linear scaling across server families. Future iterations must account for the varying efficiencies of different architectures (e.g., ARM vs. x86) and specialized accelerators like GPUs.
  • Embodied Carbon: This study focuses on operational emissions. However, the carbon cost of manufacturing and disposing of hardware (embodied carbon) is significant. Future systems should aim to balance operational savings against the carbon cost of hardware lifecycle and replacement.
  • Cluster Orchestration: Integrating LXCC with higher-level orchestrators like Kubernetes would allow for sophisticated carbon-budgeting across complex microservice architectures.

Conclusion

Carbon Containers represent a shift from reactive carbon management to proactive, system-level regulation. By treating carbon as a first-class resource—similar to CPU or memory—cloud providers can offer more sustainable services that remain functional even in the most carbon-intensive environments.

Summary updated

BibTeX
@inproceedings{thiede2023carbon,
  author = {John Thiede and Noman Bashir and David E. Irwin and Prashant J. Shenoy},
  title = {{Carbon Containers: A System-level Facility for Managing Application-level Carbon Emissions}},
  booktitle = {SoCC},
  year = {2023},
  doi = {10.1145/3620678.3624644},
}
Figure