Skip to content

feat(model-manager): add cpu-pinning-operator CPU policy - #102

Draft
kwisniewski98 wants to merge 2 commits into
intel:mainfrom
kwisniewski98:feat/cpu-pinning-operator-policy
Draft

kwisniewski98 wants to merge 2 commits into
intel:mainfrom
kwisniewski98:feat/cpu-pinning-operator-policy

Conversation

@kwisniewski98

@kwisniewski98 kwisniewski98 commented Nov 30, 2026 •

Copy link
Copy Markdown

Description

Adds cpu-pinning-operator as a fourth CPU policy, next to nri-balloons, kubelet-static and best-effort. intel/cpu-pinning-operator runs the same NRI balloons plugin, but its admission webhook pins the pod. Under this policy model-manager:

  • renders no balloon annotation. The webhook matches main / kserve-container and reads the span from --tensor-parallel-size. The pod only carries cpu-policy.model-manager.io/type: cpu-pinning-operator.
  • runs no placement pre-flight. The operator's capacity check applies instead.
  • is chosen by --cpu-policy, by MM_CPU_POLICY, or by auto-detection when the cluster has BalloonsClusterConfig/cluster. This check runs after the kube-system NRI DaemonSet check.

GPU pods are pinned too. The operator puts any pod that requests a device in its balloon-device type, but only if the CPU request equals the limit in whole cores. Under this policy, GPU runtimes (vllm-cuda, vllm-xpu) keep a whole-core CPU limit and carry the policy annotation. The policy counts when it is set by --cpu-policy or MM_CPU_POLICY, or when the operator is detected. Every other policy still renders GPU pods without a CPU limit (Burstable), as before. Those cores are dedicated, but not steered to the GPU's NUMA node unless the kubelet runs the alpha KubeletPodResourcesGet gate. Upstream advises leaving that gate off.

Before this change, MM_CPU_POLICY=cpu-pinning-operator logged Invalid MM_CPU_POLICY and fell back to best-effort.

llm_services validate now also warns when the policy is set but the operator is not installed. Docs (docs/reference/cpu-pinning.md, docs/configuration/configuration.md) and the policy comments list the new value.

Related PRs / merge order

Tests

  • python -m pytest -q model_manager/tests: 614 passed.
    • New unit test: selection by MM_CPU_POLICY and by auto-detection, plus the manifest annotations.
    • New GPU dry-run test: a CPU limit and the annotation under cpu-pinning-operator, none under nri-balloons.
    • Parity goldens: the changed help text and error messages are declared as deviations.
  • ansible-lint --skip-list name,var-naming,fqcn,yaml,jinja,key-order roles/: passed (0 failures).
  • Not yet run on a live cluster with the operator installed.

Limitations / follow-up

  • No placement pre-flight under this policy. cpu: auto takes the category default, as with kubelet-static.

intel/cpu-pinning-operator runs the NRI balloons plugin and pins model
pods from its admission webhook. Under this policy model-manager renders
no balloon annotation and runs no placement pre-flight; the operator's
capacity check applies. Auto-detection picks it when the cluster has
BalloonsClusterConfig/cluster.

llm_services validate warns when the policy is set but the operator is
not installed. Toolkit Manager sets the policy with
kubernetes_cpu_policy: cpu-pinning-operator.

Signed-off-by: kwisniewski98 <krzysztof2.wisniewski@intel.com>
The CPU Pinning Operator puts any pod that requests a device in its
balloon-device type, but only one whose CPU request equals its limit in
whole cores. Under this policy (asked for, or the operator detected) GPU
runtimes now keep a whole-core CPU limit and carry the policy annotation;
every other policy still renders GPU pods without a CPU limit.

The cores are dedicated but not steered to the GPU's NUMA node unless the
kubelet runs the alpha KubeletPodResourcesGet gate.

Signed-off-by: kwisniewski98 <krzysztof2.wisniewski@intel.com>
kwisniewski98 added a commit to kwisniewski98/toolkit-manager that referenced this pull request Nov 30, 2026
…; pin GPU pods

Reserved pool: drop cpu_pinning_operator_ht_sibling_policy and read
nri_deployment_profile / nri_reserved_cpu_list, as nri-balloons does:
- siblings (default): physical cores for models, hyperthread siblings reserved
- minimal | standard | observability | full: 8 | 12 | 16 | 20 CPUs reserved,
  models may get hyperthreads
- nri_reserved_cpu_list: that many CPUs (the operator takes a count)
On OpenShift the chart overlay's measured sizing is no longer applied, so the
profile decides there too; its SCC and reserved-namespace settings stay.

GPU: cpu_pinning_operator no longer requires kubernetes_accelerator: cpu, and
preflight no longer downgrades this policy to best-effort on GPU clusters. The
operator pins GPU pods in its balloon-device type (needs model-manager to give
them a whole-core CPU limit, intel/inference-toolkit#102).

Signed-off-by: kwisniewski98 <krzysztof2.wisniewski@intel.com>
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.

1 participant