Dominant resource fairness
Normalize heterogeneous resource demands, compare dominant shares, and state the assumptions behind a fairness policy.
On this page
The question for today
What you’ll understand
- Calculate an allocation’s dominant normalized resource share.
- Solve a small equal-weight fixed-proportion example.
- Distinguish resource-share fairness from response-time and placement guarantees.
Giving two teams the same number of CPU cores can still allocate very unequal portions of the resources each needs. One team may be memory-heavy and another compute-heavy. Dominant resource fairness compares each user’s largest normalized resource share and allocates according to that multi-resource measure. It is a precise policy under a model, rather than a promise that every job finishes equally quickly.
Normalize before taking the maximum
For each user, divide allocated CPU by total CPU capacity, allocated memory by total memory capacity, and similarly for other resource types. The largest of these fractions is that user’s dominant share. The dominant resource can differ between users and can change as demand changes. Comparing raw values such as ten CPUs and twenty GiB has no meaningful fairness interpretation. Normalization removes the units while preserving which fraction of each shared resource the user occupies.
Equal-weight DRF grows feasible allocations according to dominant-share fairness, with task demands commonly modeled as fixed resource proportions. Weighted policies can intentionally give different entitlements. The original model’s properties depend on its assumptions, including the resources and demand model being allocated. Integer jobs, placement restrictions, heterogeneous accelerators, changing demand, and non-preemptible work complicate practical allocation. A cluster plugin described as DRF-inspired should state which definition and guarantees survive those differences rather than inheriting every theorem from a name.
Equalize the relevant shares within feasibility
A CPU-heavy user may receive fewer tasks than a memory-heavy user while their dominant shares match. Equal task counts are not the definition, although some symmetric examples happen to produce them. Work through the full resource constraints before claiming an equal-share solution fits. A candidate that balances dominant shares while overallocating memory is invalid. Conversely, unused capacity can remain when a bottleneck resource prevents further growth under the workload’s fixed proportions.
Resource fairness and useful progress also differ. Two users with the same GPU share may obtain different training throughput because of hardware efficiency, parallel scaling, or communication. Time-sharing accelerators introduces checkpoint and interference costs. A service policy may combine resource entitlements with separate latency classes or admission rules, but those changes should be explicit. Do not silently mix an inference deadline objective with an equal-share training policy and then describe the result as satisfying both without evidence.
Audit entitlement and allocation separately
Record normalized usage, configured weights, runnable demand, and the constraints preventing extra allocation. A user below its entitlement may simply lack feasible work, or may be blocked by a device flavor rather than unfair queue ordering. Check that a team cannot improve its entitlement merely by splitting one identity into many uncontrolled identities. Admission and identity policy therefore belong alongside the allocation algorithm. Evaluate fairness over the intended time window; an instantaneous snapshot can misrepresent a long-running non-preemptible job’s history.
The vector lab clarifies the difference between vector length and dominant component. Reset, set angle to 0 degrees and magnitude to 1, predict the maximum normalized component, then Step. For a fresh run, Reset and explicitly set angle to 45 degrees and magnitude to 1, predict the maximum again, then Step. Both vectors have unit length, but their largest components differ. Interpret the axes as two normalized resource allocations only. The instrument has one user, no weights, and no DRF allocation procedure.
Work it through
Equal dominant shares with complementary demand
A pool has 12 CPU cores and 12 GiB. User A has unlimited identical tasks needing 1 core and 3 GiB; B’s tasks need 3 cores and 1 GiB. Use equal-weight dominant shares and permit continuous allocations while solving, then check the resulting task counts.
A’s dominant share for x tasks is 3x/12; B’s for y tasks is 3y/12. Equality gives x = y.
Substitute into both constraints: x + 3x ≤ 12 and 3x + x ≤ 12. The largest common feasible allocation is x = y = 3 tasks.
A receives (3 cores, 9 GiB) and B receives (9 cores, 3 GiB). Each dominant share is 9/12 = 0.75, and both pool totals are exactly used. The continuous solution happens to be integral.
Equal dominant shares produce different CPU allocations. The result depends on the stated demand proportions, equal weights, and unconstrained shared pool.
The living notebook
Explore the model
Interactive lab · vectors
A dominant share is not Euclidean length
Reset, set angle = 0° and magnitude = 1, predict the largest component, then Step. Compare a new Reset with both angle = 45° and magnitude = 1. Axes represent normalized resources; this one-vector instrument does not run DRF.
- x component
- 1.393
- y component
- 0.975
- Magnitude
- 1.7
Playback traces a fixed vector and its projections. Angle and magnitude set the geometry; the moving marker does not change them. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forTaking the maximum normalized component measures something different from vector magnitude.
Pause & reason
Check your understanding
Your turn
Try it yourself
A 9-core, 9-GiB pool serves equal-weight users with task shapes A = (1 core, 2 GiB) and B = (2 cores, 1 GiB). Find the equal dominant-share allocation under the same simplified fixed-proportion model.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Equal dominant shares imply equal task counts here. Check both capacities.
Compare with the solution
For x tasks each, CPU and memory demands both total 3x, so x = 3 saturates both capacities. A receives (3 cores, 6 GiB), B receives (6 cores, 3 GiB), and each dominant share is 6/9 = two thirds. Topology, integer shapes with different ratios, weights, or a lack of runnable demand can change the actual feasible policy outcome.
Keep the idea
Take it with you
- Dominant share is the largest resource allocation normalized by total capacity.
- Fair-share candidates still need complete resource feasibility checks.
- Demand assumptions, weights, identities, and placement constraints define the policy’s practical scope.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.