Abstract
In the Function-as-a-Service (FaaS) paradigm, the "cold start" problem remains a significant hurdle, forcing a trade-off between execution latency and resource efficiency. This paper introduces SPES, a rule-based, differentiated scheduler designed to optimize this trade-off. By categorizing functions based on their specific invocation patterns and utilizing fine-grained prediction strategies, SPES reduces cold start rates by nearly 50% and memory waste by over 56% compared to state-of-the-art methods. Our evaluation using the Microsoft Azure Function dataset demonstrates that SPES effectively mitigates the cold start problem while maintaining low computational overhead.
Introduction
Serverless computing, or Function-as-a-Service (FaaS), has gained immense popularity due to its "pay-per-use" pricing model and the abstraction of infrastructure management. However, this model introduces the "cold start" problem: when a function is not frequently invoked, the cloud provider decommissions its execution environment to conserve resources. Subsequent calls suffer from significant latency as the system must pull code, initialize containers, and boot runtimes.
Cloud providers currently face a binary choice: keep functions "warm" in memory to ensure low latency—which leads to significant memory waste—or evict them to save costs, resulting in poor user experience. Existing solutions, such as fixed keep-alive timers or basic statistical models, often fail to capture the complex, event-driven nature of modern serverless applications. SPES addresses this by moving away from "one-size-fits-all" approaches toward a differentiated scheduling strategy.
Methodology: The SPES Architecture
SPES is a rule-based scheduler that recognizes that different functions behave differently based on their triggers (e.g., timer-based cron jobs vs. bursty HTTP requests). The system is built on several key components:
1. Differentiated Categorization
SPES analyzes historical data to sort functions into two primary groups:
- Deterministic Categorization: Functions that exhibit clear patterns are sorted into five types: Always-warm, Regular, Appro-regular, Dense, and Successive. Each type receives a bespoke pre-loading and eviction strategy.
- Indeterminate Assignment: Functions without clear patterns are assigned to fallback categories: Pulsed, Correlated, and Possible.
2. Waiting Time (WT) Prediction
Rather than attempting to predict the exact arrival time of the next call—a task prone to high error rates—SPES predicts the "Waiting Time" (WT). This is defined as the idle interval between invocation sequences, allowing for more precise "just-in-time" loading of function environments.
3. T-lagged Co-occurrence Rate (T-COR)
To capture the logic of application workflows, SPES utilizes the T-lagged Co-occurrence Rate (T-COR). This metric identifies correlations between different functions. For instance, if Function A is frequently followed by Function B within a short window, SPES will pre-warm Function B as soon as Function A is triggered, effectively anticipating the workflow's next step.
4. Adaptive Strategies
To handle "concept shifts"—where a function's behavior changes due to software updates or shifting user trends—SPES employs "forgetting" mechanisms for stale data and real-time adjustment of predictive values to maintain accuracy over time.
Experimental Setup and Dataset
The study utilizes the Microsoft Azure Function dataset (2019), the most comprehensive industrial dataset available for serverless research. The dataset includes 14 days of real-world invocation traces from over 80,000 functions across 24,000+ applications. In our evaluation, the first 12 days were used for pattern modeling (training), while the final 2 days were used for high-fidelity simulation to measure performance against baselines such as Defuse, FaaSCache, and standard Hybrid approaches.
Key Insights
Our analysis revealed several critical insights into serverless behavior:
- Trigger Predictability: Approximately 97.4% of functions are bound to only one trigger type. Because these triggers (timers, queues, etc.) follow specific logic, invocation patterns are more predictable than previously assumed.
- Workflow Convergence: Functions rarely operate in isolation. By exploiting co-occurrence, SPES can pre-warm steps in a chain before the request actually arrives.
- Efficiency over Complexity: Unlike heavy deep learning models, SPES is rule-based. This ensures it is highly scalable and capable of making scheduling decisions in the millisecond windows required by FaaS platforms.
Results
SPES significantly outperforms existing state-of-the-art baselines across multiple metrics:
- Cold Start Reduction: SPES reduced the 75th-percentile cold start rate by 49.77% compared to the best-performing baseline (Defuse).
- Resource Efficiency: The system reduced Wasted Memory Time (WMT) by 56.43%, demonstrating a superior balance between performance and cost.
- Mitigation of "Always-Cold" Functions: The proportion of functions that never experience a warm start was reduced to less than 8%.
- Operational Overhead: The system adds only 0.44 seconds of overhead per minute of operation, making it practically invisible to end-users and providers.
Limitations and Future Work
While SPES shows significant promise, several areas for future research remain. The current simulation assumes functions finish within one minute (true for 96% of Azure functions) and assumes infinite node resources. Future iterations will explore "QoS-aware" modules to prioritize mission-critical functions (e.g., payment processing) over background tasks. Additionally, testing on multi-month datasets will be necessary to validate the system's performance against long-term seasonal shifts.
Conclusion
SPES demonstrates that a differentiated, rule-based approach to function scheduling can provide substantial improvements in both latency and resource utilization. By moving beyond simplistic keep-alive timers and leveraging the inherent predictability of function triggers, SPES offers a viable path toward more efficient and responsive serverless infrastructure.
Summary updated