Green or Fast? Learning to Balance Cold Starts and Idle Carbon in Serverless Computing
Organizations: Department of Computer Science, William & Mary, Williamsburg, VA, USA · Department of Computer Science, University of Thessaly, Volos, Greece
Abstract
Serverless computing simplifies cloud deployment but introduces new challenges in managing service latency and carbon emissions. Reducing cold-start latency requires retaining warm function instances, while minimizing carbon emissions favors reclaiming idle resources. This balance is further complicated by time-varying grid carbon intensity and varying workload patterns, under which static keep-alive policies are inefficient. We present LACE-RL, a latency-aware and carbon-efficient management framework that formulates serverless pod retention as a sequential decision problem. LACE-RL uses deep reinforcement learning to dynamically tune keep-alive durations, jointly modeling cold-start probability, function-specific latency costs, and real-time carbon intensity. Using the Huawei Public Cloud Trace, we show that LACE-RL reduces cold starts by 51.69% and idle keep-alive carbon emissions by 77.08% compared to Huawei's static policy, while achieving better latency-carbon trade-offs than state-of-the-art heuristic and single-objective baselines, approaching Oracle performance.
Figures & tables
| Dataset Source | Description | Usage in LACE-RL Framework |
| Cold Start Logs | 31-day cold start traces with breakdowns of pod allocation cost , code deploy cost . | Used to construct function-specific cold start latency ( ) by runtime |
| Request-Level Logs | Per-invocation metadata including timestamp , execution time , podID , CPU , and memory request | Used to simulate invocation traces, calculate pod reuse intervals, and model pod reuse probabilities |
| Runtime and Trigger Metadata | Static table mapping each function with its runtime language and trigger type | Used to determine runtime-sensitive latency and filter function categories |
| Benchmark Function Name | Input Size / Dimension | Memory Consumption | Cold Start Time (ms) | Compute Time (ms) | Cold-start Active Energy (J) | Compute-phase Active Energy (J) | 1-min Keep-alive-phase Active Energy (J) | Per-pod Compute-Phase Total Power (W) | Per-pod Keep-alive-phase Total Power (W) | Lambda Idle Total Power Ratio (Keep-alive/Compute) |
| Float Operations | 10,000,000 | 44 MB | 112.2 | 3340.86 | 0.94 | 15.08 | 78.29 | 6.37 | 3.19 | 0.50 |
| MatMul | 10,000 | 95 MB | 166.5 | 2393.41 | 0.27 | 144.41 | 76.98 | 86.64 | 28.89 | 0.33 |
| Linpack | 100,000 | 97 MB | 76.33 | 6401.45 | 0.7 | 436.9 | 92.4 | 147.29 | 70.82 | 0.48 |
| Image Processing | 28.4 MB | 68 MB | 2441.68 | 6761.82 | 11.13 | 20.69 | 81.6 | 4.98 | 3.21 | 0.64 |
| Video Processing | 742 KB | 233 MB | 12414.77 | 2403.04 | 19.05 | 6.82 | 72.68 | 4.65 | 3.03 | 0.65 |
| Chameleon | [500,100] | 57 MB | 71.6 | 249.52 | 0.52 | 1.84 | 81.1 | 9.27 | 3.14 | 0.34 |
| Case | Metrics | Oracle | LACE-RL | Degradation |
| General | Keep-alive Carbon (gCO 2 ) | 2.88 | 3.058 | 6.181% |
| Cold Start Count (Times) | 1069 | 1146 | 7.203% | |
| Long-tailed | Keep-alive Carbon (gCO 2 ) | 3.9 | 4.25 | 8.974% |
| Cold Start Count (Times) | 807 | 897 | 11.152% |
Cloud Computing
Cloud computing studies on-demand delivery and management of compute, storage, and services across distributed infrastructure.
See all 47 papers