Hedge Your Bets: Optimizing Long-term Cloud Costs by Mixing VM Purchasing Options

Pradeep Ambati, Noman Bashir, David E. Irwin, Mohammad H. Hajiesmaili, Prashant J. Shenoy

Abstract

Public cloud providers offer a complex landscape of Virtual Machine (VM) purchasing options, ranging from high-cost, flexible on-demand instances to deeply discounted but revocable transient instances. Navigating these options to minimize long-term costs while meeting bursty workload demands is a significant challenge for large-scale compute clusters. This paper proposes a mixed-purchasing strategy that leverages workload predictions to intelligently allocate resources. Evaluating this approach against a massive four-year university cluster trace, the authors demonstrate that a hybrid policy can reduce cloud compute costs by 50% compared to a traditional on-demand-only approach.

The Complexity of Cloud Procurement

Migrating private compute clusters to the public cloud introduces a multi-dimensional optimization problem. Major providers like AWS, Google, and Azure offer various contracts, including on-demand, multi-year reservations, and spot instances. Generally, a trade-off exists between flexibility and cost: longer commitments or higher revocation risks yield steeper discounts.

Table of common cloud VM purchasing options and their characteristics.

The primary challenge lies in the mismatch between static reservations and dynamic workloads. Committing to long-term reserved instances for peak demand leads to expensive idle capacity during troughs, while relying solely on on-demand VMs for bursty traffic is prohibitively costly.

Optimization Strategies: Offline and Online

To address this, the authors developed two distinct resource allocation frameworks:

1. Optimistic Offline Approach

This theoretical model assumes perfect knowledge of future demand. It calculates the "normalized cost" for every resource unit across all available purchasing options. For complex options like "scheduled reserved" instances, the problem is modeled as a weighted job scheduling task, solved using an $O(n \log n)$ dynamic programming algorithm to identify the most cost-effective non-overlapping schedules.

2. Practical Online Approach

For real-world deployment where future demand is unknown, the authors propose a predictive online policy. This system uses historical data (e.g., the previous year's trace) to set a baseline of reserved capacity. For incoming jobs, it employs a ridge regression model to predict runtimes based on user metadata and requested resources.

Flowchart of the online job scheduling policy for selecting between reserved, transient, and on-demand VMs.

As shown in the decision logic above, the system first attempts to utilize idle reserved capacity. If unavailable, it predicts the job's runtime to determine whether a transient VM (cheaper but risky) or an on-demand VM is more cost-effective.

Evaluation and Key Insights

The policies were evaluated using a 4-year batch trace (2015–2018) from a 14,000-core university cluster, encompassing 60 million job submissions.

  • The Power of Hybridization: A mix of reserved VMs for baseline demand and transient/on-demand VMs for peaks is significantly more efficient than any single-option strategy. This approach cut costs by 50% over on-demand-only and by 79% over peak-provisioned reserved instances.
  • Predictive Accuracy Matters: The effectiveness of transient VMs depends heavily on runtime predictions. For instance, Google’s 24-hour hard limit on preemptible VMs means underestimating a job's length leads to guaranteed revocation and costly restarts.
  • Customization vs. Bin-Packing: Google’s "customized VM" option, which allows for precise core/memory requests, proved highly effective. Despite a 5% price premium over standard instances, it reduced "bin-packing" waste, leading to overall lower costs.

Conclusion and Future Directions

While the proposed online policy achieved costs only 41% higher than the theoretical offline optimal, several avenues for improvement remain. The current model assumes no checkpointing; integrating it would further increase the viability of transient instances. Additionally, addressing user over-provisioning through automatic resource right-sizing could unlock further savings. Ultimately, this work demonstrates that intelligent mixing of cloud purchasing options is a prerequisite for cost-effective large-scale cloud migration.

Summary updated

BibTeX
@inproceedings{ambati2020hedge,
  author = {Pradeep Ambati and Noman Bashir and David E. Irwin and Mohammad H. Hajiesmaili and Prashant J. Shenoy},
  title = {{Hedge Your Bets: Optimizing Long-term Cloud Costs by Mixing VM Purchasing Options}},
  booktitle = {IC2E},
  year = {2020},
  url = {https://openreview.net/forum?id=x32IlCoVwv},
}
Figure