Balanced allocation: Memory performance tradeoffs
Suppose we sequentially put $n$ balls into $n$ bins. If we put each ball into a random bin then the heaviest bin will contain ${\sim}\log n/\log\log n$ balls with high probability. However, Azar, Broder, Karlin and Upfal [SIAM J. Comput. 29 (1999) 180–200] showed that if each time we choose two bins at random and put the ball in the least loaded bin among the two, then the heaviest bin will contain only ${\sim}\log\log n$ balls with high probability. How much memory do we need to implement this scheme? We need roughly $\log\log\log n$ bits per bin, and $n\log\log\log n$ bits in total. Let us assume now that we have limited amount of memory. For each ball, we are given two random bins and we have to put the ball into one of them. Our goal is to minimize the load of the heaviest bin. We prove that if we have $n^{1-\delta}$ bits then the heaviest bin will contain at least $\Omega(\delta\log n/\log\log n)$ balls with high probability. The bound is tight in the communication complexity model.
💡 Research Summary
The paper investigates the trade‑off between memory usage and load balancing performance in the classic “power of two choices” balls‑into‑bins process. In the standard setting, each of n balls is placed sequentially into one of two uniformly random bins, choosing the less loaded bin. This simple rule reduces the maximum load from Θ(log n / log log n) (the single‑choice case) to Θ(log log n) with high probability, but it requires maintaining the exact load of every bin. Storing the load of a single bin needs about log log log n bits, so the total memory requirement is n·log log log n bits.
The authors ask what happens when the total available memory is severely limited. They consider a model where the algorithm has only M = n^{1‑δ} bits of memory for some δ > 0 (δ may depend on n). At each step the algorithm receives the two candidate bins i and j, can read the current memory state (an M‑bit string), and may use additional private randomness to decide which bin receives the ball. This is formalized as a communication‑complexity model, which is more powerful than the usual computational model because the algorithm’s decision may depend on the full current load vector, not just on the stored bits.
Lower bound (Theorem 1.1).
Using the communication‑complexity framework, the authors prove that any algorithm with M = n^{1‑δ} bits of memory must, with probability 1 − o(1), produce a bin whose load is at least Ω(δ·log n / log log n). The proof proceeds by defining, for each memory state m, a set F_{ε}^{m} of “rare” bins whose probability of being chosen under state m is less than ε/n. A simple counting argument shows |F_{ε}^{m}| ≤ εn. The process is divided into L ≈ δ·2·log n / log log n phases, each inserting roughly n/L balls. By carefully lower‑bounding the probability that a ball lands in a “new” bin (outside the already heavily loaded set) and applying a modified Chernoff bound that handles dependencies, they show that after each phase a constant fraction of the remaining bins acquire an additional ball. Inductively, after L phases every bin in a certain large set has received at least L balls, yielding the claimed lower bound on the maximum load. Because the argument only uses the limited memory state, the bound holds for any algorithm in the computational model as well.
Upper bound (Theorem 1.2).
The authors also present an explicit algorithm that matches the lower bound up to a logarithmic factor, showing the trade‑off is essentially tight. First they observe that, even without any memory, the number of bins whose load exceeds a threshold T = 2δ·log n·log log n·(1 + 2·log(1/δ)·log(δ·log n)) is at most n^{1‑δ}/(2·log n) with high probability (by a Poisson tail bound). The algorithm maintains the list L of these “dangerous” bins and their current loads (this list fits within the M bits of advice). When a new ball arrives, if exactly one of the two candidate bins lies in L, the ball is placed in the other bin; if both lie in L, the ball goes to the bin with fewer balls (ties broken consistently); if neither lies in L, the ball is placed arbitrarily. The key observation is that balls placed into bins of L are “extra balls”. By coupling this process with the classic two‑choice scheme, the authors show that each dangerous bin receives at most O(log log n) extra balls, because the standard two‑choice analysis guarantees that any bin’s load exceeds the average by at most O(log log n) with high probability. Consequently, the total load of any bin is at most T + O(log log n) = O(δ·log n·log log n) with high probability.
Implications and contributions.
- Quantitative memory‑load trade‑off: The paper establishes that reducing memory from Θ(n·log log log n) bits to n^{1‑δ} bits forces the maximum load to increase from Θ(log log n) to Θ(δ·log n / log log n).
- Communication‑complexity lower bound: By framing the problem in a communication‑complexity setting, the authors obtain a robust lower bound that applies to any algorithm that can only retain M bits of state.
- Near‑optimal algorithm under memory constraints: The presented algorithm uses only the advice bits required to store the list of dangerous bins and achieves a maximum load within a logarithmic factor of the lower bound, demonstrating that the bound is essentially tight.
- Practical relevance: The results inform the design of hash tables, distributed load balancers, and low‑congestion routing schemes where memory is at a premium. They show that modest memory (sublinear in n) can still yield reasonable load balancing, but there is an unavoidable penalty that grows with the inverse of the memory exponent δ.
In summary, the paper provides a thorough theoretical treatment of how limited memory impacts the effectiveness of the power‑of‑two‑choices load‑balancing paradigm, delivering both lower and upper bounds that together delineate the optimal performance achievable under a given memory budget.
Comments & Academic Discussion
Loading comments...
Leave a Comment