Repository navigation
feat(kubernetes): add cpu-pinning-operator as a CPU pinning policy - #195
Draft
kwisniewski98 wants to merge 3 commits into
Draft
kwisniewski98 wants to merge 3 commits into
kwisniewski98 wants to merge 3 commits into
Conversation
kubernetes_cpu_policy: cpu-pinning-operator installs intel/cpu-pinning-operator (chart from the v1.0.0 tag) as the new platform component cpu_pinning_operator, in place of nri_cpu_balloons. Its webhook pins model-manager's serving containers (main, kserve-container) in llm-inference; hyperthread siblings form the reserved pool, as with the nri-balloons siblings profile. - preflight accepts the value and keeps kubelet cpuManagerPolicy=none - install refuses to run next to the nri_cpu_balloons plugin - install waits for BalloonsClusterConfig/cluster Ready - teardown uses helm uninstall so the chart's hooks run - Grafana dashboards and the Prometheus metrics reader follow observability - docs: docs/configuration/cpu-pinning-operator.md and reference updates Signed-off-by: kwisniewski98 <krzysztof2.wisniewski@intel.com>
…; 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>
…g Operator cpu_pinning_operator_pct_enabled (default true) sets the bundled balloons plugin's allowPCT, so it applies the operator's CPU classes through SST-CP: GPU pods' cores (balloon-device) high priority, CPU model balloons low. The plugin then runs privileged with the host's /dev mounted (on OpenShift the privileged SCC). On nodes without /dev/isst_interface the plugin logs that SST is not supported and ignores the classes. Signed-off-by: kwisniewski98 <krzysztof2.wisniewski@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds intel/cpu-pinning-operator as a new CPU pinning method:
kubernetes_cpu_policy: cpu-pinning-operator.cpu_pinning_operator(roles/cpu_pinning_operator). It is enabled only for this policy onkubernetes_accelerator: cpu, in place ofnri_cpu_balloons.v1.0.0tag into.cpu-pinning-operator/. The chart bundles the NRI balloons plugin.main(vLLM) andkserve-container(OVMS) inllm-inference. The span comes from--tensor-parallel-size.nri-balloons, so switching policy keeps the split:nri_deployment_profile: siblings(default): physical cores for models, every hyperthread sibling reserved (cpuAllocation: physical-cores,htSiblingPolicy: reserved).minimal/standard/observability/full: 8 / 12 / 16 / 20 CPUs reserved, and models may get hyperthreads (cpuAllocation: hyperthreads,reserved.cpus).nri_reserved_cpu_list: that many CPUs reserved. The operator takes a count, not CPU IDs.kubernetes_accelerator, and preflight no longer downgrades this policy tobest-effort. The operator puts GPU pods inballoon-device, which needs the whole-core CPU limit model-manager adds in feat(model-manager): add cpu-pinning-operator CPU policy inference-toolkit#102. The cores are dedicated but not NUMA-local to the GPU: that would need the alphaKubeletPodResourcesGetgate, which upstream advises leaving off.nri_cpu_balloonsplugin is still inkube-system, because two plugins would fight over the same cpusets.BalloonsClusterConfig/clusterto beReady, so model pods are not admitted unpinned.teardown: role, viahelm uninstall. The chart's hooks remove the guard webhook and the operator's node labels. Teardown then deletes the operator CRDs andballoonspolicies.config.nri. The NodeResourceTopology CRD is kept because it is shared.cpu_pinning_operator_pct_enabled: truesets the plugin'sallowPCT). The plugin applies the operator's CPU classes through SST-CP: GPU pods' cores (balloon-device) get high priority, CPU model balloons low, and the reserved pool none./devmounted (on OpenShift, theprivilegedSCC)./dev/isst_interfacethe plugin logsSST not supportedand ignores the classes. Checked in nri-plugins v0.15.2:pct.goand goresctrlSstSupported, with the device looked up under--host-root /host.observability_enabled, the Grafana per-node and cluster dashboards are switched on, andkube-prometheus-stack-prometheusis bound to the metrics reader role. The component runs afterobservability, so the chart finds the ServiceMonitor CRD.values-openshift.yaml(probe SCC, the plugin's SCC grant,openshift-*in the reserved pool), but not itsmeasuredreserved sizing, so the profile decides there too. The metrics reader is user-workload monitoring's Prometheus.cpuManagerPolicy: none, on CPU and GPU clusters. Nothing new goes into the kubespray extra vars.cpu_pinning_operator_version,_containers,_namespaces, andcpu_pinning_operator_extra_valuesfor any other chart value. Also the existingnri_deployment_profileandnri_reserved_cpu_list.docs/configuration/cpu-pinning-operator.md, plus the configuration, architecture, CLI, labels and index pages.Related PRs / merge order
cpu-pinning-operatorpolicy. Merge it first. Without it, pinning still works (the webhook pins the pod), but model-manager logsInvalid MM_CPU_POLICYand deploys asbest-effort.Tests
python3 -m pytest -q src/tests/unit: 800 passed.cert_managerandobservability, kept onteardown inference, exactly one balloons installer perkubernetes_cpu_policy, and the operator still enabled on a non-CPU accelerator.ansible-lint --skip-list name,var-naming,fqcn,yaml,jinja,key-orderon the new role and preflight: passed./host/devmounted only when PCT is on, and on OpenShift it is then bound to theprivilegedSCC.siblings,fullandnri_reserved_cpu_list: 0-3,64-67, each on Kubernetes and OpenShift.helm templateof the v1.0.0 chart accepted all six:BalloonsClusterConfiggetsphysical-cores+htSiblingPolicy: reserved,hyperthreads+ 20 reserved, andhyperthreads+ 8 reserved. An unknown profile stops with a clear message.extra_valuesmerge works;nri_cpu_balloons_enabledand the kubelet policy are right for each policy.adding-solutions.md§9:install platformwith the policy,validate cpu_pinning_operator, a second install with zero changes, deployqwen3-0-6band checkCpus_allowed_list, thenteardowntwice.Limitations
warnby default) is the only one.install.yaml).openshift-user-workload-monitoring/prometheus-user-workload) is untested.nri_reserved_cpu_listkeeps only its size: the operator chooses which CPUs.nri-balloonsis manual: undeploy the models,teardown nri_cpu_balloons, switch the policy, install. This is documented.