QoS-Aware and Cost-Efficient Dynamic Resource Allocation for Serverless ML Workflows

Hao Wu, Junxiao Deng, Hao Fan, Shadi Ibrahim, Song Wu, Hai Jin

Abstract

Serverless platforms offer instant scalability for distributed Machine Learning (ML), but static resource allocation often leads to significant inefficiencies. This paper presents CE-scaling, a framework that dynamically optimizes resource allocation for ML workflows. By leveraging Pareto boundary profiling, resource recycling in hyperparameter tuning (HPT), and real-time online performance monitoring, CE-scaling reduces job completion time (JCT) by up to 63% and costs by up to 41% on AWS Lambda.

Introduction

Distributed ML on serverless platforms like AWS Lambda is attractive due to its pay-as-you-go model and rapid scaling. However, existing systems typically rely on static allocation, which fails to account for the early termination of trials in HPT or the unpredictable nature of model convergence. This leads to significant over-provisioning or missed Quality of Service (QoS) deadlines. Furthermore, the role of external storage (e.g., S3, DynamoDB) in communication overhead is often overlooked.

System Architecture

CE-scaling treats resource allocation as a dynamic, multi-dimensional optimization problem. It manages the interaction between the user, serverless functions, and external storage for both model training and HPT phases.

Overview of the CE-scaling framework for model training and hyperparameter tuning on serverless infrastructure.

The framework's core components include:

  • Pareto Boundary Profiling: Identifies a subset of configurations (memory, function count, storage) that provide the best speed-cost trade-offs, reducing scheduling overhead by 69%.
  • Dynamic HPT Resource Recycling: In HPT workflows using Successive Halving, CE-scaling reallocates resources from terminated "loser" trials to the remaining "survivor" trials, accelerating the path to the final model.
  • Adaptive Scheduling via Online Prediction: Instead of relying on inaccurate offline estimates, CE-scaling monitors the training loss curve in real-time to adjust resources and meet QoS targets.

Online Performance Monitoring

A key innovation in CE-scaling is the move from offline sampling to online curve fitting. By fitting power-law or exponential curves to the training loss in real-time, the system achieves much higher accuracy in predicting convergence.

Comparison of prediction error between offline sampling and CE-scaling's online curve fitting approach across different models and datasets.

As shown in the evaluation, online prediction error drops significantly as training progresses, reaching an average error of just 5%. This precision allows the scheduler to make informed decisions about resource adjustments without the waste associated with traditional methods.

Key Results

The evaluation on AWS Lambda using models such as ResNet50 and BERT across diverse datasets (Higgs, Cifar10, IMDb) demonstrated substantial improvements over state-of-the-art baselines:

  • Hyperparameter Tuning: Reduced JCT by up to 63% and monetary cost by 41%.
  • Model Training: Reduced JCT by up to 58% and cost by 38%.
  • Storage Optimization: The system correctly identifies that storage needs vary by model size; for instance, using VM-based parameter servers for large models like ResNet50 to handle high communication volume.

Conclusion and Future Work

CE-scaling demonstrates that dynamic, QoS-aware resource management is essential for efficient serverless ML. By treating storage as a first-class citizen and utilizing real-time performance data, it overcomes the limitations of static provisioning. Future work will explore extending these optimizations to full ML pipelines, including data preprocessing, and adapting the framework for asynchronous training protocols.

Summary updated

BibTeX
@inproceedings{wu2023qos,
  author = {Hao Wu and Junxiao Deng and Hao Fan and Shadi Ibrahim and Song Wu and Hai Jin},
  title = {{QoS-Aware and Cost-Efficient Dynamic Resource Allocation for Serverless ML Workflows}},
  booktitle = {IPDPS},
  year = {2023},
  doi = {10.1109/ipdps54959.2023.00093},
}
Figure