Reducibility
Glossary Contents
← Ch XIX
Chapter XX Partition
Ch XXI →
  1. 58 — Two equal piles
  2. 59 — DP and Karmarkar–Karp in OCaml
  3. 60 — Load balancing across racks
60

Load balancing across racks

Splitting jobs across two machines to finish at the same time is the scheduling-floor face of partition.

Datacenter schedulers (Borg, Kubernetes, Mesos) face the partition problem at every node-pair: given a set of pods with CPU/memory requests, assign them to two replicas to minimize the maximum load. That's the makespan version, equivalent to two-machine partition. Real schedulers solve it by approximation — longest-processing-time-first (also known as Graham's rule) is a 4/3 approximation and what Kubernetes' default scheduler effectively runs. The same problem appears in transaction sharding (split keys to balance across two shards), in VLSI bisection (split a chip's modules across two halves of a die), and in cryptographic backup secret sharing (Shamir-style schemes balance share sizes).

In plain terms

If you have two delivery trucks and a pile of packages of different weights, you want to split them so the trucks have roughly equal loads. That's partition. Doing it perfectly is hard; doing it well is fast.

Scan to come back to page 60

End of Chapter XX
Chapter XXI Max Cut →
← 59 DP and Karmarkar–Karp in OCaml
3/3 · 60/63
61 The maximum cut →