TL;DR
ECOLIFE is the first carbon-aware serverless function scheduler designed to jointly optimize execution performance and environmental sustainability. By strategically balancing function "keep-alive" states across older and newer hardware generations, ECOLIFE achieves near-optimal carbon reductions with minimal impact on function response times.
What Problem Does This Paper Address?
Serverless computing (Function-as-a-Service) abstracts away infrastructure management, but it introduces a unique environmental challenge: the "keep-alive" period. To avoid the high latency of a "cold start" (loading a function into memory from scratch), cloud providers keep function containers warm in memory for a set period after execution. However, keeping these functions idle continuously draws energy and ties up hardware resources.
The total carbon footprint of a serverless function consists of two parts: embodied carbon (emissions from manufacturing the hardware) and operational carbon (emissions from the electricity grid during use). Older hardware has lower remaining amortized embodied carbon but is less energy-efficient; newer hardware is highly efficient but carries a massive manufacturing carbon debt. Furthermore, grid carbon intensity fluctuates dynamically over time. Existing schedulers either ignore carbon entirely or focus solely on energy efficiency, missing the complex trade-offs between hardware generations, keep-alive times, and dynamic grid conditions.
Methods
The authors introduce ECOLIFE, a scheduling framework that models the joint optimization of service time and carbon footprints across multi-generational hardware.
- Objective Function: ECOLIFE mathematically balances normalized service time, execution carbon, and keep-alive carbon to evaluate scheduling choices. ECOLIFE Objective Function
- Dynamic Particle Swarm Optimization (DPSO): ECOLIFE extends vanilla PSO to handle the highly volatile serverless environment. It features a perception-response mechanism that monitors real-time changes in function invocation frequency ($\Delta F$) and grid carbon intensity ($\Delta CI$). When a shift is detected, it dynamically adjusts exploration weights and randomizes half of the particle swarm to escape local optima.
- Warm Pool Adjustment: Because memory is finite, ECOLIFE implements a priority eviction mechanism. It ranks functions based on the carbon and performance penalties of a cold start vs. a warm start, gracefully evicting lower-priority functions from newer hardware to older hardware's memory pools rather than dropping them entirely.
- Execution Placement Decision Maker (EPDM): Directs incoming requests to the optimal hardware generation based on whether a warm container already exists and the current grid carbon intensity.
Datasets
- Workload Traces: Real-world serverless function invocation traces from Microsoft Azure.
- Benchmarks: The SeBS (Serverless Benchmark Suite), utilizing diverse workloads like video processing, graph search (Graph-BFS), and DNA visualization.
- Carbon Intensity: Real-time grid data from Electricity Maps, focusing on the California Independent System Operator (CISO) region, with additional robustness testing using data from Tennessee (TEN), Texas (TEX), Florida (FLA), and New York (NY).
Key Insights and Ideas
- Keep-Alive Dominates: For many serverless functions, the carbon footprint generated while sitting idle in memory (keep-alive) is significantly higher than during actual execution. This is because keep-alive periods last minutes, while execution takes milliseconds to seconds. Carbon footprint breakdown during keep-alive vs service
- The Older-Hardware Opportunity: Because older hardware has lower embodied carbon, you can "afford" to keep functions alive on it for much longer within the same carbon budget. This drastically increases the chance of a "warm start," eliminating the high operational carbon spike and latency associated with cold starts on newer hardware. Service time vs carbon footprint across generations
- The "Inverted Case": Keeping functions alive on older hardware isn't a silver bullet. When grid carbon intensity is very low, the high operational efficiency of newer hardware wins out, meaning the optimal choice flips depending on temporal grid fluctuations. Carbon intensity trade-offs and the inverted case
- Energy $\neq$ Carbon: Traditional energy-optimal schedulers perform poorly at carbon reduction because they completely ignore the manufacturing (embodied) carbon overhead of the underlying chips. Comparison of optimization strategies against the Oracle
Key Results
- Near-Oracle Performance: ECOLIFE performs remarkably close to a theoretical, brute-forced optimal "ORACLE" solution, staying within 7.7% for average service time and 5.5% for carbon footprint.
- Outperforming Baselines: Compared to a standard "new hardware only" policy, ECOLIFE reduces carbon emissions by 8.6%. Compared to an "old hardware only" policy, it slashes function service time by 12.7%.
- Negligible Overhead: The extended PSO algorithm is highly efficient, consuming less than 0.4% of total service time and accounting for just 1.2% of the carbon footprint for decision-making.
Limitations and Future Work
- Embodied Carbon Inaccuracies: Calculating embodied carbon relies heavily on external vendor data and lifecycle assessment methodologies, which are inherently prone to minor estimation errors (though the authors show ECOLIFE remains robust even with a $\pm10\%$ variance).
- CPU-Centric Focus: The current implementation focuses primarily on CPU-based serverless environments. While the underlying multi-generational trade-offs apply to GPUs, adapting ECOLIFE for heterogeneous GPU clusters requires future work on GPU-specific carbon modeling.
- Data Center Maintainability: Mixing multiple generations of hardware can introduce operational and maintenance complexities for infrastructure teams, an area that requires further long-term study.
Summary updated