Resource requests and feasibility
Separate admission accounting, runtime consumption, and enforcement while checking every required resource dimension.
On this page
The question for today
What you’ll understand
- Check residual capacity using compatible units and all dimensions.
- Distinguish declared requests from limits and measured usage.
- Explain why a feasible accounting vector does not guarantee application performance.
A training worker asks for CPUs, host memory, and an accelerator. A dashboard shows low average CPU usage, yet the scheduler refuses another worker. That can be correct: placement is usually based on declared accounting and constraints, while runtime usage changes afterward. A reliable feasibility test identifies which quantities it compares, their units, and which additional conditions must hold before the application can actually run.
Keep three different quantities separate
A request represents the resource quantity used by the scheduling or admission policy. A limit governs a runtime constraint under the platform’s enforcement mechanism. Measured usage records what the workload consumed over a particular observation interval. They can differ substantially. An idle process can retain its resource request, and a workload may consume more CPU than its request when permitted capacity is available. Do not infer that unused requested capacity has automatically become schedulable capacity under the same policy.
In Kubernetes, CPU and memory requests inform scheduling, while limits have resource-specific runtime behavior. CPU enforcement can throttle execution; memory pressure or limit enforcement can lead to termination rather than slowing memory use smoothly. Device resources can follow additional allocation and sharing contracts. Avoid transferring a CPU-sharing intuition to GPU memory without checking the actual implementation. The declared values should reflect supported workload behavior and operational policy, not simply the smallest numbers that make one test placement succeed.
A resource vector is only part of feasibility
Use allocatable capacity after system reservations rather than the machine’s advertised total. Include relevant overhead and account for the workload’s execution shape, such as simultaneously running containers or worker replicas. Then check hard constraints: device type, node labels, storage availability, topology, and required affinity. Summing free GPUs across the cluster does not place a task requiring several compatible devices on one host. A quota admission decision may also be separate from the final pod-to-node scheduling decision.
Declared accounting can fit while actual execution still performs poorly. Requests do not model every shared bottleneck, such as network fabric contention, memory bandwidth, or accelerator interconnect. Collect per-stage metrics and peak usage, including model loading and checkpoint bursts. Adjust declarations through a controlled process that watches failures and latency. Blindly shrinking requests because average usage is low can create overcommitment that appears efficient until synchronized bursts arrive. Record the safety margin and the evidence behind it.
Normalize carefully and investigate rejection reasons
Normalize each dimension by its own capacity when comparing shapes, but retain the original units for decisions and debugging. A normalized vector can show that memory is tight while CPU has room. It cannot reveal whether the requested accelerator model exists or whether a storage volume is attachable. Report concrete infeasibility reasons rather than a generic pending status: insufficient requested memory, incompatible device type, and unsatisfied topology imply different remedies. A larger cluster may not fix a constraint that every new node also violates.
Use the vector lab for a two-resource normalized example. Reset, set angle to 45 degrees and magnitude to 1, predict both components, then Step. Treat unit capacity in each positive axis as a separate resource budget. For a fresh comparison, Reset and explicitly set angle to 45 degrees and magnitude to 2, predict whether either component exceeds one, then Step. The instrument draws one vector and projections only; it has no nodes, live allocations, limits, or scheduling decisions.
Work it through
Check the binding dimension
A node has 16 allocatable CPU cores and 64 GiB of host memory. Existing requests account for 10 cores and 40 GiB. A worker requests 4 cores and 28 GiB. Ignore every other constraint for this arithmetic test.
Compute residual accounting capacity: 16 − 10 = 6 cores and 64 − 40 = 24 GiB. The quantities remain separate dimensions.
Compare the worker request componentwise. Four cores fit in six, but 28 GiB does not fit in 24 GiB. CPU availability cannot compensate for the missing four GiB.
Reject this placement under the stated policy. If memory request were justified at 20 GiB instead, both resource checks would pass, while device, topology, and runtime behavior would still need verification.
Memory is the blocking declared resource. Low measured CPU usage does not change this componentwise accounting result.
The living notebook
Explore the model
Interactive lab · vectors
Requests have separate normalized components
Reset, set angle = 45° and magnitude = 1, predict x and y, then Step. Compare a fresh Reset with both angle = 45° and magnitude = 2. Each positive axis has a hypothetical unit capacity; this is one vector, not a placement solver.
- 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 forA request must satisfy each resource constraint; unused capacity in one dimension cannot replace another.
Pause & reason
Check your understanding
Your turn
Try it yourself
A node has 12 allocatable cores and 48 GiB. Existing requests use 7 cores and 30 GiB. Test a request for 5 cores and 18 GiB, then one for 5 cores and 19 GiB. Explain why passing the first test does not guarantee accelerator compatibility.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Equality fits in this simplified policy, but each resource still needs its own comparison.
Compare with the solution
Residual capacity is exactly 5 cores and 18 GiB. The first request fits both dimensions; the second exceeds memory by one GiB. Neither test includes accelerator type, count, memory layout, or sharing rules. Those constraints must be checked separately, along with overhead and other platform conditions omitted from this arithmetic example.
Keep the idea
Take it with you
- Requests, limits, and measured usage are different contracts and observations.
- Feasibility is componentwise and uses allocatable capacity with compatible units.
- Resource fit is necessary but does not establish all placement constraints or performance.
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.