Skip to main content
QUICK REVIEW

[Paper Review] Balanced offline allocation of weighted balls into bins

Ömer Burak Demirel, Ivo F. Sbalzarini|arXiv (Cornell University)|Apr 10, 2013
Advanced Queuing Theory Analysis7 references3 citations
TL;DR

This paper proposes SortedGreedy[m], a sorting-based greedy algorithm for the offline weighted balls-into-bins problem, where balls are sorted by weight before being assigned to the lightest available bin. It achieves at least an order of magnitude smaller gap (load imbalance) than the standard Greedy[m] algorithm, with negligible performance overhead, making it highly effective and practical for load balancing in distributed systems with known task weights.

ABSTRACT

We propose a sorting-based greedy algorithm called SortedGreedy[m] for approximately solving the offline version of the d-choice weighted balls-into-bins problem where the number of choices for each ball is equal to the number of bins. We assume the ball weights to be non-negative. We compare the performance of the sorting-based algorithm with a naive algorithm called Greedy[m]. We show that by sorting the input data according to the weights we are able to achieve an order of magnitude smaller gap (the weight difference between the heaviest and the lightest bin) for small problems (<= 4000 balls), and at least two orders of magnitude smaller gap for larger problems. In practice, SortedGreedy[m] runs almost as fast as Greedy[m]. This makes sorting-based algorithms favorable for solving offline weighted balls-into-bins problems.

Motivation & Objective

  • To address the offline weighted balls-into-bins problem, where task weights are known in advance, to minimize load imbalance across processors or bins.
  • To improve upon the standard Greedy[m] algorithm by introducing a sorting phase that prioritizes heavier balls.
  • To demonstrate that sorting by weight significantly reduces the gap (difference between heaviest and lightest bin) without incurring substantial computational overhead.
  • To evaluate the performance of SortedGreedy[m] across varying problem sizes and numbers of bins, particularly in large-scale scenarios.
  • To establish the practical viability of sorting-based algorithms for real-world load balancing applications.

Proposed method

  • The algorithm sorts all weighted balls in descending order of weight before assignment.
  • It applies a greedy assignment strategy: each ball is placed into the currently lightest bin among the m bins.
  • The method is formally defined as SortedGreedy[m], with time complexity O(n log n) due to sorting, followed by O(n) assignment steps.
  • The approach is compared against the baseline Greedy[m] algorithm, which assigns balls in input order without prior sorting.
  • Simulations use uniformly distributed random weights in [0,10] and repeat 1000 times to compute mean and standard deviation of the gap.
  • Runtime measurements are conducted on a 2^13 ball instance to assess performance overhead, showing minimal difference between SortedGreedy[m] and Greedy[m].

Experimental results

Research questions

  • RQ1Does sorting balls by weight before greedy assignment significantly reduce the load imbalance (gap) in the offline weighted balls-into-bins problem?
  • RQ2How does the performance of SortedGreedy[m] scale with increasing numbers of balls and bins compared to Greedy[m]?
  • RQ3What is the computational overhead of sorting, and does it remain negligible even for large-scale problems?
  • RQ4Does the gap in SortedGreedy[m] decrease exponentially with increasing problem size, as observed in simulations?
  • RQ5Can SortedGreedy[m] achieve a constant or sub-constant gap in the heavily loaded regime (n ≫ m), and how does it compare to existing theoretical bounds?

Key findings

  • For n ≤ 4000 balls, SortedGreedy[2] achieves a gap that is 10 to 60 times smaller than Greedy[2], with the ratio increasing to 60 for n ≥ 32 when m=2.
  • For m=8 bins and n ≥ 512, the gap ratio between SortedGreedy[2] and Greedy[2] reaches approximately 73, indicating a 73-fold improvement.
  • For n ≥ 4096, the gap ratio exceeds two orders of magnitude in favor of SortedGreedy[m], demonstrating exponential improvement with problem size.
  • The standard deviation of the gap for SortedGreedy[2] is 0.01 (m=2) and 0.03 (m=8), significantly lower than Greedy[2]’s σ = 0.23 and 0.15, respectively.
  • The runtime of SortedGreedy[2] is 0.1950 s for 2^13 balls, compared to 0.1948 s for Greedy[2], indicating a 2 ms overhead (0.02% of total time).
  • The gap from SortedGreedy[m] decreases exponentially with increasing n, while Greedy[m]’s gap remains nearly constant across n, highlighting the algorithm’s scalability.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.