Abstract
One key to enabling high-performance serverless computing is to mitigate cold-starts. Current solutions utilize a warm pool to keep function alive: a warm-start can be analogous to a CPU cache-hit. However, modern cache has multiple hierarchies and the last-level cache is shared among cores, whereas the warm pool is limited to a single tenant for security concerns. Also, the warm pool keep-alive policy can be further optimized using cache replacement algorithms. In this paper, we borrow practical optimizations from caching, and design FaasCamp, a caching-aided multi-tenant serverless computing framework. FaasCamp extends the single-tier warm pool into multi-tiers, with a reclaim pool introduced enabling secure function instance sharing among tenants. Also, FaasCamp leverages machine learning to approximate the optimal cache replacement policy to improve the warm rate. We have implemented a prototype and conducted extensive experiments under multiple scenarios. The results show that FaasCamp can outperform existing platforms with minimal overhead.
Introduction
Serverless computing (FaaS) is prized for its elasticity, but it suffers from the cold start problem: the high latency incurred when a platform must initialize a new container for a function request. To mitigate this, platforms maintain "warm pools" of idle containers. However, current warm pools face two major flaws in multi-tenant, resource-limited settings like edge servers. First, strict isolation for security prevents a warm container used by one tenant from being reused by another, leading to redundant resource consumption. Second, standard eviction heuristics like Least Recently Used (LRU) often fail to handle the bursty, unpredictable invocation patterns typical of serverless workloads.
FaasCamp: A Caching-Aided Framework
FaasCamp reimagines serverless warm pools as multi-tiered caches, borrowing concepts from CPU caching architecture to optimize resource utilization and performance.
Multi-Tiered Reclaim Pool
Similar to a Last-Level Cache (LLC) shared among CPU cores, FaasCamp adds a second-tier "reclaim pool." When a container stays idle in a tenant's private warm pool for too long, it is moved to the reclaim pool instead of being destroyed. To ensure security, FaasCamp uses the CRIU (Checkpoint/Restore in Userspace) tool to restore the container to a "clean" state (post-initialization but pre-execution), wiping any intermediate data before another tenant can use it.
ML-Guided Eviction
FaasCamp replaces standard eviction policies with a deep learning-based invoker. The model is a neural network trained to approximate Belady’s Algorithm—the theoretical "optimal" policy that evicts the item that will be needed furthest in the future. A StateTracker component monitors system-wide and per-container features (e.g., invocation frequency, idle time, and request history) to provide real-time data for the ML model's inference.
Evaluation and Results
The framework was evaluated using real-world Azure Functions traces and the FunctionBench suite. The results demonstrate that the cache-inspired approach significantly outperforms traditional heuristics.
Warm Rate and Eviction Performance
In multi-tenant scenarios, FaasCamp improved the warm start rate significantly. For "mobile users" with infrequent function calls, the warm rate was up to 4x higher than vanilla OpenWhisk. Furthermore, the ML-based policy achieved an 11% higher warm rate than FaasCache (the previous state-of-the-art) in memory-constrained setups, closely approaching the theoretical performance of Belady's algorithm.
Latency and Overhead
In cluster evaluations, FaasCamp reduced average response times from ~10–14 seconds (under LRU/LFU) to under 1 second in several scenarios by avoiding queuing delays and cold starts. The restoration process adds about 430ms of overhead, but because this happens while the container is idle (moving from warm to reclaim pool), it is transparent to the user. ML inference adds a negligible ~38ms to the decision process.
Conclusion
By treating warm-starts as "cache hits" and cold-starts as "cache misses," FaasCamp successfully applies hardware caching research to serverless infrastructure. The introduction of a secure reclaim pool and ML-optimized eviction allows for significantly higher resource efficiency and lower latency, particularly in the resource-constrained environments typical of edge computing.
Summary updated