Papers
Topics
Authors
Recent
2000 character limit reached

Dynamic Bin Packing (DBP)

Updated 30 December 2025
  • Dynamic Bin Packing (DBP) is a scheduling problem that allocates items with specific arrival and departure times to fixed-capacity bins in online or semi-online settings.
  • It applies to various settings including 1D, vector, and geometric models, proving essential for cloud resource allocation, memory management, and storage optimization.
  • Recent advances feature competitive online algorithms, effective data reduction techniques, and migration strategies that balance repacking costs with system performance.

Dynamic Bin Packing (DBP) defines a class of problems in which items arrive and depart over time and must be assigned to bins of fixed capacity in a manner that maintains feasibility throughout the process, typically with objectives such as minimizing bin usage, active bin time, or fragmentation. Unlike static bin packing, DBP inherently operates under online or semi-online constraints, requiring the maintenance of a valid packing as the set of items changes due to arrivals and departures. The domain encompasses classical 1D, vector, and geometric (2D/3D) settings, and is central to resource allocation in cloud systems, memory management, and storage. Recent research in DBP has advanced data reduction techniques, characterized tight competitive ratios for online algorithms, and revealed tradeoffs involving migration and repacking costs.

1. Formal Models and Core Definitions

The canonical DBP instance is parameterized by a sequence of nn items, each characterized by size si(0,1]s_i \in (0,1] and temporal information—arrival aia_i and departure ei>aie_i > a_i. In the 1-dimensional case, packing is into unit-capacity bins such that, for all times tt, the sum of the sizes of active items in each bin does not exceed 1. The multi-dimensional generalization, Dynamic Vector Bin Packing (DVBP), assigns each request ii a size vector a(i)Nda^{(i)} \in \mathbb{N}^d and each bin a capacity vector bNdb \in \mathbb{N}^d; the packing must satisfy iBj,s(i)t<e(i)a(i)b\sum_{i \in B_j,\, s^{(i)} \leq t < e^{(i)}} a^{(i)} \leq b componentwise for every bin BjB_j and every time tt (Bevern et al., 2022, Murhekar et al., 2023).

Objectives vary:

DBP is parameterized by three critical quantities in the vector setting:

  • dd: dimension of the resource.
  • φ\varphi: number of distinct request types (unique combinations of size and time interval).
  • hh: instance height, the maximum number of overlapping requests at any time.

2. Online and Fully-Dynamic Algorithmic Paradigms

The online nature of DBP has spurred the development of competitive algorithms with intricate tradeoffs. The “Any Fit” family—First Fit (FF), Next Fit (NF), Move-To-Front (MTF)—serves as the fundamental class in both 1D and vector forms:

  • FF packs each new item into the first bin with sufficient available capacity; opens a new bin only if none exists.
  • NF always tries to add to a single current bin; otherwise, closes and opens anew.
  • MTF packs into the most recently used fitting bin, moving it to the front.

Competitive ratio (CR) analyses for the MinUsageTime-DVBP model yield tight upper and lower bounds as functions of duration variability μ=maxi(i)/minj(j)\mu = \max_i \ell(i) / \min_j \ell(j) and resource dimension dd:

  • CRMTF(2μ+1)d+1\mathrm{CR}_{\text{MTF}} \leq (2\mu+1)d + 1; CRFF(μ+2)d+1\mathrm{CR}_{\text{FF}} \leq (\mu+2)d + 1; CRNF2μd+1\mathrm{CR}_{\text{NF}} \leq 2\mu d + 1.
  • No Any-Fit algorithm can achieve CR<(μ+1)d\mathrm{CR} < (\mu+1)d (Murhekar et al., 2023).

Table: Summary of Competitive Ratios for MinUsageTime-DVBP | Algorithm | Upper Bound | Lower Bound | |-----------|------------------------------|-----------------------| | MTF | (2μ+1)d+1(2\mu+1)d+1 | max(2μ,(μ+1)d)\max(2\mu,(\mu+1)d) | | FF | (μ+2)d+1(\mu+2)d+1 | (μ+1)d(\mu+1)d | | NF | 2μd+12\mu d+1 | 2μd2\mu d |

Experimental findings indicate MTF provides both strong worst-case guarantees and the best empirical performance under synthetic multi-resource job traces.

In 2D and 3D, DBP commonly appears in dynamic storage allocation and online packing under spatial and temporal constraints. Constrained DRL methods—CMDP formalisms with feasibility-mask prediction—now achieve user-level or super-human packing rates for online 3D-BPP, outperforming both prior heuristics and non-learning counterparts in space utilization and policy efficiency (Zhao et al., 2020).

3. Data Reduction, Kernelization, and Approximation

Due to parameterized and worst-case complexities, data reduction is critical. DVBP is NP-hard; even 2D static VBP resists constant-factor approximation. Notably:

  • No polynomial kernel (parameterized by h+φh+\varphi) exists for the gap version of DVBP unless coNP \subseteq NP/poly. This is proved via AND-composition reductions from static vector bin-packing with scaled weights (Bevern et al., 2022).
  • Exact instance reduction: Grouping jobs by type and applying relabeling ("time compression") can reduce effective problem size from nn to as few as O(φ)O(\varphi). The induced integer program (ILP) for TT types and kk bins is solvable in time 2O((Tk)log(Tk))poly(n)2^{O((T k)\log(T k))} \mathrm{poly}(n) using Lenstra–Kannan methods.
  • (1+ϵ\epsilon)-approximate data reduction: Deleting up to k0=ϵLk_0 = \lfloor \epsilon L \rfloor bins—where LL is the natural volume lower bound over all time and dimensions—and solving the reduced instance yields an overall (1+ϵ)(1+\epsilon)-approximate solution. Greedy algorithms using priority functions (favoring small flavors and large spans) are effective heuristics for determining deletion candidates, leading to empirical instance shrinkage by factors of 10–50 with only a few percent overhead in bin count (Bevern et al., 2022).

4. Migration, Repacking, and Tradeoffs

Migration, or repacking, is a fundamental mechanism to adapt the packing as items depart or when improved solutions become possible. However, migration incurs costs (e.g., I/O, delays, or energy).

Three key results define the regimes:

  • No migration (o(n)o(n) items): CR is Θ(μ)\Theta(\mu); sublinear migration budgets do not improve over the migration-free online bounds. Any zero-migration algorithm has a lower bound of μ/2\mu/2 (Mellou et al., 23 Aug 2024).
  • Linear migration (αn\alpha n items for constant α(0,1)\alpha \in (0,1)): CR improves smoothly to O(1/α)O(1/\alpha), achievable via the “Good/Bad” bin scheme, with matching lower bounds. Above nn migrations, constant CR (approximately $1.387$) is attainable by algorithms that mimic offline approximations (Mellou et al., 23 Aug 2024, Gupta et al., 2017).
  • Migration with delays: In delay models where each migration causes a CC-unit delay in item service, the optimal competitive ratio is O(min(C,μ))O(\min(\sqrt{C},\mu)), with tight lower bounds (Mellou et al., 23 Aug 2024).

For the fully-dynamic model with bounded repacking:

  • Optimal tradeoff: Asymptotic CR α01.3871\alpha_0 \approx 1.3871 (Lambert WW function root) is achievable with amortized repacking O(ε2)O(\varepsilon^{-2}); general movement costs yield CR 1.589\approx 1.589. Migration lower bounds are Ω(1/ε)\Omega(1/\varepsilon) per update (Gupta et al., 2017, Berndt et al., 2014).

Fully-dynamic packing without bundled moves has been shown to match lower bounds with O(1/ε2)O(1/\varepsilon^2) item moves per update, giving optimal tightness (Feldkord et al., 2017): α=11W1(2/e3)+11.3871.\alpha = 1-\frac{1}{W_{-1}(-2/e^3) + 1} \approx 1.3871.

5. Dynamic Bin Packing in Systems and Cloud Applications

Dynamic bin packing underlies cloud scheduling, dynamic storage allocation, and memory management. In cloud infrastructure, the MinUsageTime-DVBP model abstracts online VM/job allocation under pay-as-you-go pricing. Here, Any-Fit algorithms (notably, MTF) have been shown to be both theoretically optimal (up to constant factors) and practically superior in average-case scenarios, motivating their adoption in real online resource allocators (Murhekar et al., 2023).

In memory allocation, dynamic 2D bin packing corresponds to minimizing makespan (maximum memory usage over time) and fragmentation in general-purpose allocators. Empirical results using real workload traces show that standard online allocators (e.g., glibc malloc) often compete within a few percent of the best known offline 2DBP algorithms in makespan, although 2DBP solvers can substantially improve page-local fragmentation in some cases—achieving up to 2.46×2.46\times lower real gaps (Lamprakos et al., 2023).

Practical algorithmic schemes for online/dynamic 3D-BPP (e.g., in industrial packing or logistics) now employ deep RL and sophisticated feasibility predictors to achieve robust performance under strict physical and timing constraints (Zhao et al., 2020).

6. Open Problems and Future Directions

Several open questions remain at the frontier:

  • Polynomial-size kernelization for approximate DVBP with small ϵ\epsilon remains elusive; all-known data reductions for small ϵ\epsilon are super-polynomial in worst-case size (Bevern et al., 2022).
  • Improved heuristics for greedy approximations in data reduction, particularly for streaming and online arrival models; current methods are effective empirically, but theoretical guarantees are limited.
  • Integration of pattern-learning and duality-based pricing schemes under changing stochastic conditions, as suggested by recent intersections of data mining and OR duality frameworks in online bin packing (Zhang et al., 27 Aug 2024).
  • Exploration of hybrid online-offline schemes for storage allocation, leveraging offline DBP during low-activity windows to defragment memory or storage.

This body of research delineates a rich set of approaches and highlights the interdependence of structural hardness, repacking tradeoffs, and new algorithmic mechanisms in realizing efficient and adaptive dynamic packing systems.

Whiteboard

Topic to Video (Beta)

Follow Topic

Get notified by email when new papers are published related to Dynamic Bin Packing (DBP).