Motivated by the problem of packing Virtual Machines on physical servers in the cloud, we study the problem of one-dimensional online stochastic bin packing. Items with sizes sampled independent and identically (i.i.d.) from a distribution with integral support arrive as a stream and must be packed on arrival in bins of size B, also an integer. The size of an item is known when it arrives and the goal is to minimize the number of non-empty bins (or equivalently, waste, defined to be the total unused space in non-empty bins). Online stochastic bin packing has been extensively studied in theoretical computer science, combinatorics, and probability literature, and there exist many heuristics. However all such heuristics are either optimal for only certain classes of item size distributions, or rely on learning the distribution. The state-of-the-art Sum of Squares heuristic (Csirik et al. [8]) obtains sublinear (in number of items seen) waste for distributions where the expected waste for the optimal offline algorithm is sublinear, but has a constant factor larger waste for distributions with linear waste under OPT. In [8] , the authors solved this problem by learning the distribution and solving an LP to inject phantom jobs in the arrival stream. As our first contribution, we present two distribution-agnostic bin packing heuristics that achieve additive O( √ n) waste compared to OPT for all distributions. Our algorithms are essentially gradient descent on suitably defined Lagrangian relaxations of the bin packing Linear Program. The first algorithm is very similar to the SS algorithm, but conceptually packs the bins top-down instead of bottom-up. This motivates our second heuristic that uses a different Lagrangian relaxation to pack bins bottom-up. Our heuristics can also be interpreted as iterative Primal-Dual algorithms, and provide a unified view of Primal-Dual algorithms in stochastic processes, convex optimization and theoretical computer science communities. Next, we consider the more general problem of online stochastic bin packing with item departures where the time requirement of an item is only revealed when the item departs. Our algorithms extend as is to the case of item departures, and we demonstrate their excellent performance experimentally. We also briefly revisit the Best Fit heuristic which has not been studied in the scenario of item departures yet.
Very recently, REF has new results on the classical one-dimensional online bin packing; it also contains heuristics and simulations for the corresponding system with item departures, which is a special case of our model.
Online Stochastic Bin Packing
ArXiv
ArXiv
Mathematics Computer Science