AI Infra Interviews logo
Kubernetes, Slurm & GPU Scheduling / 07
mediumNewOpenAIAnthropicMeta

Eight research teams share 1,024 GPUs. Design the quota and fairness policy, and tell me how they will game it.

Static quotas waste half the fleet and a free-for-all starves the small teams. The four-layer policy (guaranteed quota, borrowing, fair-share ordering, preemption) with the pooling arithmetic that justifies it, the fair-share ratio worked by hand, and the five ways teams game it.

Updated Sep 2026 · Grounded in real AI infrastructure interview loops and written to a senior-engineer editorial bar, with every number worked and every diagram hand-built.

TL;DR: Give every team a guaranteed quota it can reclaim by preempting borrowers, let idle quota be borrowed at lower priority, order the queue by fair share (recent usage divided by entitlement, lowest ratio first), and account for every allocated GPU-hour so hoarding costs money. The pool runs near 85% where eight private clusters run near 43%, and the policy holds only if it anticipates hoarding, job splitting, priority inflation and deadline stampedes.

How to approach it

Open by asking what the teams' peak and average demands look like and whether any of them serve production traffic, because a serving team needs a hard wall rather than a quota. Then do the pooling arithmetic first, so the interviewer hears why a shared pool exists before hearing how it is governed. Walk the policy in the order a job meets it: quota, borrowing, fair share, preemption, accounting. Close with the gaming moves, because a policy that has not named them will meet them within a quarter.

A strong answer

A typical situation: a lab has eight research teams, each convinced it needs 128 GPUs at peak, and a finance team asking why utilization on the existing per-team clusters sits under half. The pooling case is arithmetic:

inputs:  8 teams, peak demand 128 GPUs each, average demand 55 GPUs each
private clusters:
  bought   = 8 × 128 = 1,024 GPUs
  used     = 8 × 55  = 440 GPUs on average
  util     = 440 ÷ 1,024 = 43%
one shared pool of 1,024:
  the eight peaks rarely coincide, so the pool's peak is closer to 600 to 700 than 1,024
  at an 85% target: 0.85 × 1,024 ≈ 870 GPUs of useful work per hour, against 440
sanity: 870 ÷ 440 ≈ 2x the useful work from the same hardware, which is the whole
        reason a platform team exists; the price is the policy below and its tickets

The gain vanishes if peaks correlate (every team launches before the same conference) or if one team can sit on capacity it does not use. The policy is what prevents both, and Multi-Tenancy, Quotas and Fair Share covers the mechanisms; here is how they fit together.

Quota is the guarantee. Team A's nominal 128 GPUs are A's whenever A asks, enforced by preempting whoever is borrowing them. In Kueue this is a ClusterQueue's nominal quota inside a cohort; in Slurm it is a QoS or partition limit per account. Hierarchical quotas matter at lab scale: the pretraining organization gets 512, its three subteams split them, and a subteam can borrow from a sibling before borrowing from another organization.

Borrowing is the utilization. When A is idle, B runs on A's 128 at a priority that marks the capacity as borrowed and therefore reclaimable. Without borrowing, quotas rebuild the private clusters inside the pool.

Fair share is the queue order, and it is a ratio, not a rank:

fair-share ratio = decayed usage over the window ÷ entitlement
window: 7 days, half-life 3 days, entitlement = quota share of the pool
team A: quota 128 (12.5% of pool), used 400 GPUs average this week → 400 ÷ 128 = 3.1
team B: quota 128, used 50 → 50 ÷ 128 = 0.39
both submit at once: B goes first, A's job waits even though A is under quota right now
sanity: A ran 3x its entitlement all week by borrowing; the ratio pulls it back toward
        12.5% over the half-life without anyone filing a ticket

Preemption is the enforcement. When A submits and its quota is occupied by B's borrowed jobs, the scheduler evicts B's lowest-priority whole gang and requeues it. Whole gangs, never a partial eviction, because a gang missing one rank is worth nothing (Gang Scheduling with Kueue and Volcano). The checkpoint cadence of borrowed jobs therefore sets the cost of being preempted, and teams running on borrowed capacity should checkpoint the way spot users do.

Accounting closes the loop: GPU-hours allocated, per team, per job, per partition, priced, and visible to the team lead. It feeds the fair-share score and the internal bill.

rendering diagram…

Now the gaming, which is where the answer earns its score:

MoveWhat the team doesFix
hoardingplaceholder jobs hold quota "in case"charge allocated hours, used or idle; publish per-team utilization
job splittingone 256-GPU gang becomes 32 jobs of 8 to dodge a per-job cap and to be harder to preemptcaps per team, not per job; preempt by team priority
priority inflationeverything is urgenta fixed monthly budget of high-priority GPU-hours per team
deadline stampedeevery peak lands the week before a launchreservations booked ahead and charged whether used or not
research steals from servingborrowing reaches into the serving poola hard wall: serving capacity is never borrowable; research borrows only from research

The decision: quota plus borrowing plus fair share plus preemption, with allocated-hour chargeback. The condition that reverses it toward static quotas is a pool where the teams' peaks are strongly correlated and every team runs at its quota most of the time; there is nothing to borrow, and the preemption churn costs more than it recovers. That is rare, and a team claiming it should be asked for the utilization graph.

The reversal condition: a fleet with one team on it. Quota, borrowing and fair share are all machinery for arbitration, and with no one to arbitrate between they are overhead that slows admission. Multi-Tenancy, Quotas and Fair Share is where the four layers earn their place. kubectl describe resourcequota and the scheduler's pending reasons are where a starved team's evidence comes from.

What interviewers probe next

  • "A product team says research is stealing their GPUs. What do you do?" Show that serving capacity sits behind a hard wall and borrowing flows only into research pools; if it does not, that is the bug to fix today.
  • "How do you pick the half-life?" Long enough that a weekend of heavy use does not zero a team's priority on Monday, short enough that last month's usage does not matter: 3 to 7 days is where most fair-share configurations land.
  • "What stops preemption from thrashing?" A minimum runtime before a borrowed job becomes preemptible, and preempting the most recently started borrower first so the least work is lost.
  • "Two jobs want different resource mixes, one GPU-heavy, one CPU-heavy. How do you compare them?" Dominant resource fairness: compare each job on the share of the resource it uses most.

Common mistakes

  • Proposing static quotas per team and calling it fair; it is fair and it leaves half the fleet idle.
  • Skipping the pooling arithmetic, so the policy sounds like bureaucracy rather than a 2x on useful work.
  • Preempting individual pods instead of whole gangs, which leaves the victim job holding GPUs it cannot use.
  • Charging for used GPU-hours only, which makes hoarding free.

Key takeaways

  • Pooling: 8 × 128 private at 43% used versus one pool at 85%; roughly 2x useful work per GPU.
  • Four layers in order: guaranteed quota, borrowing at low priority, fair share as usage ÷ entitlement with a decay window, whole-gang preemption; accounting feeds all of them.
  • Charge allocated hours, cap per team, budget priority, charge reservations, wall off serving.
  • Kueue cohorts and ClusterQueues, Slurm QoS and fair-share factor, KAI shares are the names to give.
That one was free — and so are 10 answers per topic without an account. Signing in doubles that to 20, opens the Plus lessons in the courses, and remembers which topics you keep getting wrong.no card · Google sign-in · nothing to cancel
HOW DID IT GO?
0
READING SIGNED OUT

Signing in doubles your free answers, from 10 to 20 per topic, and the site starts remembering you: mastery per topic, bookmarks, and a next-focus recommendation. Free, no card.

Sign in free

The concepts behind this question

Ranked by how closely each one overlaps this question's topic, so the first card is the thing to read if the answer above moved too fast.

Advanced
🗂️ Scheduling & Orchestration🔒 Premium
Multi-Tenancy, Quotas and Fair ShareA shared GPU pool is cheaper than ten private ones because ten teams' demand is smoother than one team's, and it only works if the sharing is enforced. Quotas say what each team is guaranteed, borrowing lets idle guarantees be used by others, fair share decides who waits when everyone wants more, and preemption reclaims borrowed capacity. This page works the arithmetic that makes pooling worth it, the layers of isolation a tenant needs, and the incentive problems (hoarding, gaming, the research-versus-product tension) that any policy has to survive.
Advanced
🗂️ Scheduling & Orchestration🔒 Premium
Gang Scheduling with Kueue and VolcanoA distributed training job is 64 pods that start together or not at all: if 40 are running and 24 are Pending, the 40 hold their GPUs idle at a collective barrier waiting for ranks that may never come, and two such jobs can deadlock a whole cluster. Gang scheduling makes the job the unit of admission. Kueue and Volcano add queues, quotas, priorities and preemption on top, which is what turns a pile of GPUs into a platform several teams can share without starving each other.
Advanced
🗂️ Scheduling & Orchestration🔒 Premium
Topology-Aware SchedulingTwo placements of the same 64-GPU job can differ by 2x in step time: one keeps every tensor-parallel group on a single NVSwitch node and every data-parallel ring on a single rail, the other scatters ranks across racks and pushes per-layer traffic through the spine. The scheduler is the only thing that can prevent the second placement, because the framework maps ranks to whatever GPUs it is handed. Topology-aware scheduling means the scheduler knows the hierarchy (NVLink domain, rail, rack, spine block) and places gangs to keep traffic low in it.
Foundational
🗂️ Scheduling & Orchestration
Slurm vs KubernetesEvery GPU platform team has this argument, and the two schedulers were built for different jobs: Slurm for long, large, all-or-nothing training on bare metal; Kubernetes for many services that scale up and down. Training fleets run Slurm because gang scheduling, topology and MPI-style launch are native there; serving fleets run Kubernetes because autoscaling and rolling deploys are native there. A platform that does both picks a hybrid: Slurm on Kubernetes (Slinky, Soperator) or a batch scheduler on Kubernetes (Kueue, Volcano, KAI). The interview question is which, for which workload, and why.
UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE

Scored on doing the pooling arithmetic before naming any mechanism, on stating fair share as a ratio with a decay window, and on naming at least three gaming moves with the fix for each.

DISCUSSION · 0

No comments yet — be the first to share your approach.