Allocation of fungible resources via a fast, scalable price discovery method

Akshay Agrawal, Stephen P. Boyd, Deepak Narayanan, Fiodar Kazhamiaka, Matei Zaharia

TL;DR

This paper introduces a custom, parallelizable "price discovery" algorithm for allocating fungible resources (like different types of GPUs or CPUs) across millions of jobs. By leveraging dual decomposition and an analytical solution that proves each job needs at most two resource types, the authors achieve solve times three orders of magnitude faster than commercial solvers, handling up to 50 million jobs in seconds on a GPU.

What Problem Does This Paper Address?

In large-scale computer systems, we often need to decide how to distribute a limited pool of resources (e.g., various hardware configurations) among a massive set of tasks. The catch is that these resources are fungible: a job can run on an older GPU, a newer one, or a mix of both, but its efficiency will vary depending on the choice.

The goal is to maximize "total utility"—a measure of how well the system is performing—while staying within strict resource limits. While this is technically a convex optimization problem (which means it's "solvable"), standard off-the-shelf solvers struggle to scale. When you have millions of jobs and multiple resource types, the number of variables explodes into the tens or hundreds of millions, making real-time scheduling nearly impossible for traditional software.

Methods

The authors develop a custom algorithm based on dual decomposition and price discovery.

  1. The Dual Approach: Instead of solving the massive allocation problem directly, they solve the "dual" problem. They introduce a variable $p$ for each resource, which can be interpreted as a price.
  2. Parallel Subproblems: If you fix the prices of resources, the giant problem magically splits into millions of tiny, independent subproblems—one for each job. Each job simply tries to maximize its own "net utility" (utility minus the cost of resources at current prices).
  3. The Analytical Shortcut: This is the paper's "secret sauce." The authors prove that for any given set of prices, the optimal solution for a single job will use at most two types of resources. This allows them to derive an explicit, lightning-fast analytical formula for the subproblems, avoiding the need for a generic solver in the inner loop.
  4. Price Discovery: The algorithm iteratively adjusts the prices. If a resource is over-used, the price goes up; if under-used, the price goes down. They use sophisticated update methods like L-BFGS to reach the optimal prices quickly.
  5. Implementation: The entire method is implemented in PyTorch, allowing it to run on GPUs and exploit massive hardware parallelism.

Datasets

The paper uses synthetic but realistic datasets to evaluate performance.

  • They generate efficiency vectors (how well each job runs on each resource) and resource limits that mimic real-world cluster constraints (e.g., more efficient resources are scarcer).
  • They test scales ranging from $10^2$ to $50 \times 10^6$ jobs.
  • While no standard public benchmark for this specific problem existed at this scale, the authors provide an open-source library, resalloc, to allow others to reproduce their results.

Key Insights and Ideas

  • The Power of Two: The realization that a job only ever needs two resource types to be optimal is a major theoretical simplification. It turns a search through $m$ resources into a simple parametric calculation.
  • Prices as a Signal: The dual variables $p$ aren't just mathematical abstractions; they provide a clear economic signal. These prices can be used to charge users for hardware usage or to "shard" a large data center into smaller, independently managed pieces without losing much efficiency.
  • Embarrassingly Parallel: By moving the complexity into the dual problem, the authors transformed a tightly coupled global problem into a set of independent tasks perfectly suited for the SIMD (Single Instruction, Multiple Data) architecture of modern GPUs.

Key Results

  • Speedup: On a problem with 1 million jobs, the custom method was roughly 1,000x faster than MOSEK (a top-tier commercial solver).
  • GPU Performance: The algorithm solved a 1-million-job problem in 0.3 seconds on a GPU.
  • Extreme Scale: The authors successfully solved a problem with 50 million jobs (200 million variables) in just 7.9 seconds on an NVIDIA V100 GPU. This is a scale that would likely crash or stall traditional interior-point solvers.
  • Convergence: The "price discovery" typically converges in just a few dozen iterations, even for massive problems.

Limitations and Future Work

  • Non-Fungible Resources: The current model assumes resources are interchangeable (like different types of memory). It does not yet handle "bundles" of non-fungible resources (e.g., a job that requires exactly 2 CPU cores and 8GB of RAM simultaneously). The authors note this as a direction for a future paper.
  • Job Interference: The model assumes a job's efficiency is independent of what other jobs are running. In reality, jobs sharing a cache or memory bus can slow each other down. The authors suggest this could be mitigated by a lower-level scheduler that takes their optimal "time-slices" as input.
  • Separability: The method requires the utility function to be "separable" (the total utility is the sum of individual job utilities). While they show how to approximate non-separable goals like "max-min fairness," it isn't a native fit for the algorithm.

Summary updated

BibTeX
@inproceedings{agrawal2022allocation,
  author = {Akshay Agrawal and Stephen P. Boyd and Deepak Narayanan and Fiodar Kazhamiaka and Matei Zaharia},
  title = {{Allocation of fungible resources via a fast, scalable price discovery method}},
  booktitle = {Math. Program. Comput},
  year = {2022},
  url = {https://openreview.net/forum?id=oTbyrk8o2p},
}
Figure