Fully-Dynamic Bin Packing with Limited Repacking

Anupam Gupta, Guru Guruganesh, Amit Kumar, David WajcarXiv 2017

Abstract

In the fully-dynamic bin packing problem, items of various sizes arrive and depart over time, and the goal is to maintain a packing that uses a near-optimal number of bins while minimizing the cost of moving items (recourse). This paper establishes tight upper and lower bounds for three primary movement cost models: unit costs, size-based costs (migration factor), and general costs. A key contribution is the identification of a fundamental barrier at a competitive ratio of $\approx 1.3871$ for unit-cost recourse, alongside algorithms that achieve near-optimal performance across all models by leveraging LP-guided packing and stable matching techniques.

Introduction

The Bin Packing Problem is a cornerstone of combinatorial optimization, traditionally studied in static or online (insertion-only) settings. However, modern applications like cloud storage and data center resource management are inherently fully-dynamic: files or virtual machines are created and deleted unpredictably. In these environments, a storage provider must balance efficiency (minimizing the number of active disks or servers) with stability (minimizing the bandwidth and wear-and-tear caused by moving data between disks).

This paper formalizes this trade-off by analyzing the asymptotic competitive ratio (a.c.r.)—the ratio of bins used compared to an optimal offline solution—against the recourse, which measures the cost incurred by repacking items to maintain that ratio.

Movement Cost Models

The authors categorize the problem into three distinct cost models to reflect different real-world constraints:

  1. Unit Costs: Every item move costs 1, regardless of size. This models scenarios where the overhead of initiating a transfer is the dominant cost.
  2. Size Costs (Migration Factor): Moving an item costs exactly its size $s_i$. This is typical in data migration where bandwidth usage is proportional to file size.
  3. General Costs: Each item $i$ has an arbitrary movement cost $c_i$, allowing for heterogeneous priority or sensitivity levels.

Algorithmic Innovations

To achieve near-optimal trade-offs, the authors introduce several sophisticated techniques:

  • LP-Guided Packing: For unit costs, a Linear Program (LP) is used to define a "target curve" for packing. Small items are strategically placed to fit this curve, ensuring that bins are structured to accommodate future large item arrivals without requiring excessive repacking.
  • Stable Matchings (Gale-Shapley): For general costs, the authors adapt the "Super Harmonic" family of online algorithms. By treating groups of items as nodes in a bipartite graph and applying a variant of the Gale-Shapley stable matching algorithm, they maintain packing invariants as items are deleted, ensuring that the remaining items share bins efficiently.
  • Bucketing and Ghost Items: To manage small items without constant reshuffling, bins are grouped into buckets. "Ghost items"—placeholders for deleted items—are used to delay repacking until the accumulated change in volume justifies the movement cost.
Staircase construction for lower bounds in the unit-cost model.

The 1.3871 Barrier and Unit-Cost Recourse

A major theoretical insight of the paper is the identification of the "magic number" $\alpha \approx 1.3871$, derived from the Lambert $W$-function. The authors prove that achieving a competitive ratio better than this value in the unit-cost model requires a polynomial increase in repacking or additive bin overhead. They provide an algorithm that matches this bound with $O(\epsilon^{-2})$ amortized recourse, effectively settling the trade-off for this model.

Dynamic adjustment of item placement (red blocks) to maintain packing efficiency as items are inserted or deleted.

General and Size-Based Costs

For general movement costs, the paper demonstrates that dynamic bin packing is fundamentally as difficult as the standard online version. Even with recourse, algorithms cannot beat the known lower bounds for online packing (currently $\approx 1.540$). The authors' Super Harmonic-based algorithm achieves a ratio of 1.589 with constant recourse.

In the size-cost model, the authors utilize the divisibility properties of Sylvester sequences to show that a $(1+\epsilon)$ competitive ratio is achievable if and only if $\Omega(1/\epsilon)$ amortized recourse is allowed. This settles the optimal trade-off for the migration factor.

Conclusion

This work provides a comprehensive map of the trade-offs between efficiency and stability in dynamic bin packing. While gaps remain—most notably closing the distance between the 1.540 online lower bound and the 1.589 dynamic upper bound for general costs—the results establish that a small, controlled amount of repacking is sufficient to maintain high efficiency in volatile environments. Future work may explore "black-box" reductions that could potentially transform any online bin packing algorithm into a fully-dynamic one with limited recourse.

Summary updated

BibTeX
@misc{gupta2017fully,
  author = {Anupam Gupta and Guru Guruganesh and Amit Kumar and David Wajc},
  title = {{Fully-Dynamic Bin Packing with Limited Repacking}},
  year = {2017},
  eprint = {1711.02078},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1711.02078},
}
Figure