Abstract
Serverless computing, or Function-as-a-Service (FaaS), offers developers a highly scalable and cost-effective execution environment. However, achieving low latency and meeting Service Level Agreements (SLAs) remains a challenge due to the overheads of data movement and container initialization. Traditional delay scheduling, which waits for local resources to become available, often fails in serverless contexts due to high variability in function execution times and input sizes. We present Metronome, a novel scheduling framework that utilizes online machine learning to implement differentiated delay scheduling. By predicting execution times and intelligently balancing data and infrastructure locality, Metronome reduces mean execution times by up to 95% while ensuring strict SLA compliance.
Introduction
In the FaaS paradigm, performance is primarily measured by execution latency. To minimize this, schedulers often attempt to achieve "locality"—running a function on a node that already possesses the required data or a pre-initialized (warm) container. Delay scheduling is a common technique where the system waits briefly for a local node to become free rather than immediately dispatching the task to a remote, idle node. While effective in predictable big data environments, static delay scheduling is often counterproductive in serverless systems where function durations and resource requirements vary by orders of magnitude.
The Challenges of Serverless Scheduling
The authors identify three primary reasons why traditional, rule-based delay scheduling is insufficient for serverless workloads:
- Input Sensitivity: The benefit of waiting for data locality depends heavily on input size. For small inputs, the network transfer time is negligible, making any delay in scheduling a net loss.
- Complex Locality: Serverless performance is influenced not just by data proximity but also by "infrastructure locality"—the availability of warm containers, cached libraries, or zygote processes.
- Extreme Variability: Serverless functions can range from milliseconds to minutes in duration. Static timeouts (e.g., "wait 2 seconds") can lead to significant tail latencies and frequent SLA violations for short-lived functions.
The Metronome Framework
Metronome addresses these challenges through a differentiated approach driven by real-time predictions. The framework is built upon three pillars:
- Continuous Profiling: Distributed agents monitor node-level metrics, including CPU usage, I/O throughput, and the state of the local container pool.
- Online Random Forest Regression (RFR): Metronome employs a lightweight RFR model to predict function execution times on specific nodes. The model uses online learning to adapt to shifting workload patterns without the heavy overhead of deep learning.
- Differentiated Scheduling Algorithm: The scheduler classifies nodes as "Local" or "Fallback." It calculates a "safe delay threshold" for each invocation, ensuring that any wait for locality does not jeopardize the user-defined SLA.
Experimental Evaluation
The researchers implemented Metronome on the OpenLambda platform and evaluated it using FunctionBench, which includes representative workflows such as Video Processing, Log Analysis, Document Conversion, and ML Inference. The evaluation also incorporated production traces from major cloud providers to simulate realistic, high-concurrency environments.
Results
Metronome demonstrates substantial improvements over traditional round-robin and state-of-the-art locality-aware schedulers:
- Performance Gains: The system achieved a reduction in mean execution time ranging from 64.88% to 95.83% across the benchmark suite.
- SLA Compliance: Unlike rule-based schedulers that can cause SLA violations in up to 10% of cases, Metronome maintained a 0% violation rate by dynamically adjusting delays based on predicted execution times.
- Efficiency: The RFR model achieved high precision with a median error of 0.44%, while the scheduling logic introduced a negligible overhead of less than 60 microseconds per decision.
Conclusion
Metronome proves that predictive, input-aware scheduling is essential for optimizing serverless performance. By moving away from static heuristics to a differentiated delay model, Metronome successfully balances the trade-offs between data locality, infrastructure readiness, and strict performance guarantees. Future research will explore extending this logic to geo-distributed clusters and complex multi-function workflows.
Summary updated