Skip to content

Add optimizing Kubernetes applications and services with NRI resource policies - #51

Open
askervin wants to merge 3 commits into
intel:mainfrom
askervin:5id-add-kubernetes-nri
Open

Add optimizing Kubernetes applications and services with NRI resource policies#51
askervin wants to merge 3 commits into
intel:mainfrom
askervin:5id-add-kubernetes-nri

Conversation

@askervin

Copy link
Copy Markdown

No description provided.

Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
Signed-off-by: Antti Kervinen <antti.kervinen@intel.com>
@adgubrud
adgubrud requested review from adgubrud and a lite review from Copilot August 14, 2026 16:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the Optimization Zone documentation to cover Kubernetes-focused tuning by introducing a new Kubernetes section centered on NRI (Node Resource Interface) resource-policy plugins, with supporting pages for policy selection and hands-on usage.

Changes:

  • Adds a Kubernetes section to the root README with navigation to new NRI resource-policy documentation.
  • Introduces Kubernetes Optimization docs and NRI resource-policy pages (Topology-aware, Balloons, choosing guides, and a Balloons quickstart).
  • Adds cross-references from existing hardware guides (NUMA, Priority Core Turbo) to the relevant Kubernetes/NRI policy docs.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
README.md Adds top-level navigation entries for the new Kubernetes optimization documentation.
kubernetes/README.md Introduces the Kubernetes Optimization landing page and maps existing Optimization Zone topics to NRI policy features.
kubernetes/nri-resource-policies/README.md Adds an NRI resource-policy overview plus install/configuration guidance.
kubernetes/nri-resource-policies/topology-aware.md Adds a Topology-aware policy summary and links to upstream reference docs.
kubernetes/nri-resource-policies/balloons.md Adds a Balloons policy summary and links to upstream reference docs/recipes.
kubernetes/nri-resource-policies/choosing-a-policy.md Adds guidance for choosing between Topology-aware and Balloons.
kubernetes/nri-resource-policies/choosing-a-policy-with-kubernetes-managers.md Explains how NRI policies relate to Kubernetes built-in managers and when to use each approach.
kubernetes/nri-resource-policies/quickstart.md Adds a step-by-step Balloons quickstart demonstrating latency isolation with Redis and a noisy neighbor.
hardware/priority_core_turbo/README.md Adds a Kubernetes callout pointing readers to using Balloons for PCT-related pod placement/tuning.
hardware/NUMA/README.md Adds a Kubernetes callout pointing readers to using Topology-aware for NUMA-aligned pod placement.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


This guide provides a Docker-based workflow and supporting scripts to check PCT support, configure CLOS assignments, and validate the selected high-priority CPU list. The PCT setup and verification steps run from the container, so users do not need to install `intel-speed-select` or other extra host-side dependencies beyond Docker.

> **Running in Kubernetes?** To assign PCT high-priority cores to specific pods, use the Balloons policy. See [Kubernetes Optimization](../../kubernetes/nri-resource-policies/balloons.md).
Comment thread hardware/NUMA/README.md

This directory collects best practices, case studies, and performance opportunities for running workloads in NUMA environments. The goal is to help you understand why hardware topology matters, identify configuration mismatches that leave performance on the table, and apply proven, hardware-aware patterns to your deployments.

> **Running in Kubernetes?** The Topology-aware policy applies NUMA-aligned placement to every pod automatically. See [Kubernetes Optimization](../../kubernetes/nri-resource-policies/topology-aware.md).
Comment on lines +56 to +60
Check the DaemonSet is ready:

```bash
kubectl -n kube-system rollout status ds/nri-resource-policy-topology-aware
```

@adgubrud adgubrud left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your submission! I like that this article references other existing articles and enhances them with tie-ins to Kubernetes. Most of what I found was just providing expanded forms of lesser known abbreviations. My only other concern is about the Redis performance examples in the quickstart guide. That data might have to go through PDT or be removed.

- **Device-aligned placement.** Pick the pool nearest the devices a workload
uses, so CPU, memory, and device stay local.

- **CPU tuning, PCT, and IRQ affinity (Guaranteed containers only).**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **CPU tuning, PCT, and IRQ affinity (Guaranteed containers only).**
- **CPU tuning, Primary Core Turbo (PCT), and IRQ affinity (Guaranteed containers only).**

[Topology-aware](topology-aware.md) instead.

A balloon can hold containers of any QoS class: BestEffort, Burstable, or
Guaranteed. Its tuning (frequency, C-states, PCT, IRQ affinity, scheduling)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Guaranteed. Its tuning (frequency, C-states, PCT, IRQ affinity, scheduling)
Guaranteed. Its tuning (frequency, C-states, Primary Core Turbo (PCT), IRQ affinity, scheduling)

- **Scales further.** The built-in managers already struggle to align well
around 8 NUMA nodes. Topology-aware keeps working at 8 nodes and beyond.
- **More tuning for Guaranteed containers.** It can also set CPU frequency,
C-states, PCT, and IRQ affinity for Guaranteed containers with exclusive

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
C-states, PCT, and IRQ affinity for Guaranteed containers with exclusive
C-states, Primary Core Turbo (PCT), and IRQ affinity for Guaranteed containers with exclusive


## Balloons vs. the built-in managers

Balloons has different semantics. Instead of per-pod pinning rules, you

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Balloons has different semantics. Instead of per-pod pinning rules, you
Balloons have different semantics. Instead of per-pod pinning rules, you

applications, or namespaces into the same pool, or keep them apart. This
grouping is more flexible than the built-in managers allow.
- **More to tune, for any QoS class.** Each pool can set CPU frequency,
C-states, EPP, PCT high-priority cores, real-time scheduling, I/O priority,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
C-states, EPP, PCT high-priority cores, real-time scheduling, I/O priority,
C-states, Energy Performance Preference (EPP), PCT high-priority cores, real-time scheduling, I/O priority,

Switch to **[Balloons](balloons.md)** when you need any of these:

- dedicated CPU pools for groups of containers or pods,
- CPU frequency, C-states, EPP, PCT, or IRQ tuning for **any** QoS class, not

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- CPU frequency, C-states, EPP, PCT, or IRQ tuning for **any** QoS class, not
- CPU frequency, C-states, Energy Performance Preference (EPP), Primary Core Turbo (PCT), or IRQ tuning for **any** QoS class, not

Comment thread kubernetes/README.md
| Memory bandwidth vs. latency trade-off | Balloons spreading across NUMA nodes and sockets, or local-only |
| Multi-tier memory (DRAM, HBM, PMEM) | Topology-aware multi-tier allocation |
| [Priority Core Turbo](../hardware/priority_core_turbo/README.md) | Balloons CPU classes, any QoS; Topology-aware CPU classes, Guaranteed containers only |
| [CPU frequency, EPP, governor](../software/common/README.md) | Balloons CPU classes: min/max frequency, governor, EPP, uncore |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| [CPU frequency, EPP, governor](../software/common/README.md) | Balloons CPU classes: min/max frequency, governor, EPP, uncore |
| [CPU frequency, Energy Performance Preference (EPP), governor](../software/common/README.md) | Balloons CPU classes: min/max frequency, governor, EPP, uncore |

`dedicated[0]` and `shared[0]` hold different CPUs; `reserved[0]` is the pool
for system pods.

## 4. Measure tail latency

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jasukhar would this need to go through PDT? We're not stating to expect this performance on any particular Intel platform but it's a performance claim so I'm not sure.

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.

3 participants