Skip to content

Burstable pods with unlimited memory should respect unlimitedBurstable - #874

Open
kad wants to merge 2 commits into
containers:mainfrom
kad:fix/unlimited-burstable
Open

kad wants to merge 2 commits into
containers:mainfrom
kad:fix/unlimited-burstable

Conversation

@kad

@kad kad commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

Fixes the scenario where pod with memory limits set respects the unlimited-burstable.resource-policy.nri.io and one without memory limit specified always ends up on root pool.

@kad
kad requested a review from klihub October 24, 2026 10:03
kad added 2 commits October 24, 2026 13:05
When comparing two pools for a burstable container with an unlimited CPU
limit, compareScores returned true for the case where the second pool
wins on the burstability level limit. Returning true means the first
pool sorts first, so the comparison ranked the loser ahead. Every other
branch returns false when the second pool wins. Return false here too.

Signed-off-by: Alexander Kanevskiy <alexander.kanevskiy@intel.com>
A burstable container with a memory request but no memory limit always
ended up in the root pool. The memory burstability check ran before the
CPU burstability check and, for a zero limit, preferred the pool with
the largest memory capacity. That is always the root, so the
unlimitedBurstable setting (and the per-container annotation) never got
a say. A pod requesting 1 CPU and 1G of memory with no limits was
pinned to the shared cpuset of the whole machine and had its memory
spread over every NUMA node.

Keep the capacity check for containers that have a memory limit. For
unlimited memory, decide after the CPU burstability check: a pool at the
configured unlimitedBurstable topology level wins, and only for a tie do
we prefer the pool with more memory capacity.

Add a unit test for the placement. Change test14-burstable accordingly,
since pod3 (memory limit 0) now gets one socket instead of all four NUMA
nodes by default.

Signed-off-by: Alexander Kanevskiy <alexander.kanevskiy@intel.com>
@kad
kad force-pushed the fix/unlimited-burstable branch from 5cfca2c to 7683461 Compare October 24, 2026 10:05

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants