Overview
Dexter is a novel resource allocation manager designed to optimize serverless data analytics for both speed and cost. By combining machine learning predictions with a reactive "hill-climbing" search, it optimizes Apache Spark workloads at a per-stage level. This approach achieves up to a 4.65x cost reduction and 5.75x resource savings compared to default scaling methods.
The Challenge of Serverless Auto-scaling
Serverless computing offers "infinite" scalability and a pay-as-you-go model, but running complex frameworks like Spark on these platforms is challenging. The core issue lies in auto-scaling: default Spark behavior often requests resources exponentially to clear backlogs, leading to massive over-provisioning in serverless environments.
As shown in the figure above, adding more workers eventually yields diminishing returns due to communication overhead and "cold starts"—a phenomenon known as the "elbow" effect. Consequently, throwing more hardware at a job often increases the bill significantly while barely improving runtime. Current solutions often lack the fine-grained control needed to handle the diverse requirements of different execution stages within a single application.
The Dexter Architecture
Dexter addresses these challenges by operating at a per-stage granularity through three main components:
- The Historical Module (Predictive): When a new stage begins, Dexter uses a Machine Learning model (specifically Boosted Decision Stumps) trained on historical stage features (like task count and RDD sizes) to predict an initial executor count.
- The Search Module (Reactive): Once the stage is running, Dexter uses a Hill Climbing algorithm to fine-tune the allocation. It monitors performance and cost, moving toward a "saturation point" where the cost-to-performance tradeoff is optimal.
- Dynamic Time Interval Analysis: Dexter uses a linear regression model to determine the optimal time to check in based on average task runtime, ensuring the system has enough data to make a smart decision without waiting too long.
Key Insights: The Importance of Per-Stage Granularity
A critical finding is that the "saturation point"—where adding more executors becomes wasteful—varies wildly between different stages of the same application. Scaling an entire application uniformly is inherently inefficient.
By adopting a conservative scaling strategy, Dexter avoids the "cold start" penalty associated with spawning too many containers for short-lived tasks. The choice of simple ML models and Hill Climbing ensures negligible system overhead (measured in milliseconds), making it practical for production use.
Key Results and Performance
Evaluated against industry-standard benchmarks like TPC-H, TPC-DS, Terasort, and PageRank, Dexter significantly outperformed Spark’s default FIFO and FAIR scheduling strategies:
- Cost Efficiency: Achieved cost reductions of up to 4.65x.
- Performance-Cost Tradeoff: Improved overall efficiency (a composite metric of time and money) by up to 3.50x.
- Resource Savings: Used up to 5.75x fewer resources. For example, in TPC-H q7, Dexter achieved comparable runtimes using only 15 executors compared to the baseline's 50.
- Robustness: Dexter remained effective on "unseen" workloads, proving its ability to understand general resource dynamics rather than just memorizing specific queries.
Limitations and Future Work
Future development for Dexter includes allowing users to define their own priorities (e.g., prioritizing strict deadlines over cost) and accounting for external system bottlenecks like gRPC communication or object storage. Additionally, explicitly modeling the cost of "cold starts" across different cloud providers remains an area for further research.
Summary updated