Bamboo: Making Preemptible Instances Resilient for Affordable Training of Large DNNs

John Thorpe, Pengzhan Zhao, Jonathan Eyolfson, Yifan Qiao, Zhihao Jia, Minjia Zhang, Ravi Netravali, Guoqing Harry Xu

Introduction

Training state-of-the-art deep neural networks (DNNs) like GPT-3 has become prohibitively expensive, with compute costs often reaching millions of dollars. To mitigate these costs, cloud providers offer "preemptible" or "spot" instances at significant discounts (70-90%). However, these instances can be reclaimed by the provider at any moment, making them highly unreliable for long-running, stateful tasks like DNN training.

Preemptible instance availability across different cloud providers showing high volatility.

Frequent preemptions create a significant challenge for traditional training workflows. Standard "checkpoint and restart" methods are inefficient in these environments, as they often require redoing work lost between the last save and the failure, potentially wasting up to 77% of the training window. Other approaches, such as dropping data samples or live migration, either degrade model accuracy or are infeasible during cluster-wide preemption events.

Bamboo: Resilience through Redundant Computation

Bamboo is a distributed system designed to enable affordable training on these volatile instances. Its core innovation is Redundant Computation (RC), a technique inspired by RAID storage that protects training progress by performing extra work during idle periods.

Leveraging Pipeline Bubbles

Large-scale DNNs are typically trained using pipeline parallelism, where the model is partitioned across multiple GPUs. Due to the sequential nature of forward and backward passes, GPUs often experience "bubbles"—idle periods where they wait for data from preceding or succeeding stages.

Comparison of standard pipeline parallelism (a) and common scheduling techniques like GPipe (b) and PipeDream (c).

Bamboo repurposes these bubbles for reliability through two main mechanisms:

  1. Forward Redundant Computation (FRC): Each node in the pipeline performs the forward pass for its assigned layers as well as its neighbor's layers. Since this occurs during existing pipeline bubbles, it introduces negligible overhead to the overall training time.
  2. Lazy Backward Redundant Computation (BRC): Because the backward pass (gradient calculation) lacks natural bubbles, Bamboo performs redundant backward work "lazily." This work is only triggered if a neighboring node fails, ensuring that the training clock is not slowed down during normal operation.

Memory and Scheduling Optimizations

To manage the increased memory demands of redundant computation, Bamboo swaps intermediate results to the CPU, retrieving them only when a failure is detected. Additionally, Bamboo employs Zone-Aware Scheduling. By ensuring that consecutive nodes in a pipeline are located in different data center zones, Bamboo minimizes the probability that a node and its redundant "shadow" fail simultaneously during a zone-wide preemption.

Evaluation and Results

The researchers evaluated Bamboo using a variety of models (ResNet-152, VGG-19, BERT-Large, GPT-2) and datasets (ImageNet-1K, WMT16, Wikicorpus En).

  • Throughput and Cost: Bamboo achieves 3.7× higher throughput than traditional checkpointing under typical failure rates and reduces monetary costs by 2.4× compared to standard on-demand instances.
  • Resilience: Even in extreme scenarios where 33% of the cluster is preempted every hour, Bamboo remains stable and cost-effective.
  • Recovery: The use of lazy BRC reduces failure recovery time by approximately 35% compared to simpler redundancy schemes.

Conclusion

Bamboo demonstrates that the inherent inefficiencies of pipeline parallelism—the bubbles—can be transformed into a valuable resource for system resilience. By over-provisioning clusters with cheap nodes, Bamboo provides a faster and more affordable path to training massive AI models. Future work will focus on extending support to tensor model parallelism and implementing dynamic scheduling to adapt to real-time cluster health.

Summary updated

BibTeX
@inproceedings{thorpe2023bamboo,
  author = {John Thorpe and Pengzhan Zhao and Jonathan Eyolfson and Yifan Qiao and Zhihao Jia and Minjia Zhang and Ravi Netravali and Guoqing Harry Xu},
  title = {{Bamboo: Making Preemptible Instances Resilient for Affordable Training of Large DNNs}},
  booktitle = {NSDI},
  year = {2023},
  url = {https://openreview.net/forum?id=sP7zznijuD},
}
Figure