Abstract
Serverless computing (Function-as-a-Service) offers high scalability but suffers from a chronic resource efficiency gap. Developers typically over-provision resources—a practice known as early binding—to ensure Service Level Objective (SLO) compliance against worst-case execution variability. This paper introduces Janus, a framework that enables late-binding resource adaptation through bilateral engagement between developers and providers. By leveraging offline profiling to generate compact "hints," Janus allows providers to dynamically resize functions at runtime. Evaluation shows that Janus improves resource efficiency by up to 34.7% while maintaining strict latency targets with negligible overhead.
1. Introduction: The Information Barrier
In current serverless environments, developers must specify resource allocations (CPU/RAM) before deployment. Due to runtime variability caused by input sizes or "noisy neighbors," developers often size for the 99th percentile (P99) latency. Data from production environments like Huawei Cloud reveals that half of all functions utilize less than 10% of their allocated CPU, representing massive waste.
This inefficiency stems from a fundamental information barrier: developers understand workflow structures but lack real-time runtime data, while providers possess runtime data but lack the domain knowledge to safely resize functions within a complex workflow. This "slack"—the gap between actual execution time and the allocated SLO—is pervasive across popular and niche functions alike.
2. The Janus Framework
Janus addresses this barrier by splitting resource management into offline preparation and online adaptation.
2.1 Bilateral Engagement
The framework consists of three core components:
- The Profiler (Developer Side): Conducts offline runs across various resource configurations to map execution time distributions (P1 to P99).
- The Synthesizer (Developer Side): Generates a compact hints table. This table maps the remaining workflow time budget to optimal resource settings for the next function. Janus employs a "Heavier Head" strategy, focusing optimization on the immediate next function while maintaining conservative downstream allocations to absorb potential delays.
- The Adapter (Provider Side): An online component that calculates the remaining budget after each function execution and applies the developer's "hints" to resize the subsequent function in the chain.
2.2 Risk Management
To balance efficiency and reliability, Janus introduces two metrics: Timeout (the risk of exceeding profiled time) and Resilience (the capacity for downstream functions to compensate for upstream delays by scaling up). This allows the system to intentionally "under-provision" early functions to save resources, knowing it can recover if needed.
3. Evaluation
Janus was evaluated using real-world workflows, including Intelligent Assistant (IA) and Video Analyze (VA), using standard datasets like COCO2014 and SQuAD2.0.
3.1 Resource Efficiency and SLO Compliance
Janus achieved a 29.9% to 34.7% improvement in resource efficiency compared to state-of-the-art systems like ORION and GrandSLAM. Crucially, it maintained high SLO compliance by utilizing the "resilience" of the workflow. As shown in the comparison of CPU core usage, the late-binding approach significantly reduces the resource footprint compared to traditional early-binding methods.
3.2 System Overhead and Scalability
The online adaptation decision is highly efficient, taking less than 3ms, which is suitable for sub-second serverless functions. Furthermore, the hints table approach is extremely scalable; by focusing on discrete resource blocks, Janus achieves hint compression ratios of up to 99.6%, making the "bridge" between developer and provider lightweight.
4. Conclusion
Janus demonstrates that the "information barrier" in serverless computing can be overcome through collaborative, bilateral resource adaptation. By shifting from static early binding to dynamic late binding guided by developer-provided hints, cloud providers can significantly reclaim wasted resources without compromising the performance guarantees essential for modern serverless workflows.
Summary updated