Skip to content

Commit b96af01

Browse files
committed
update docs for prefer-align-cpus-by-uncorecache feature
1 parent 1332f3f commit b96af01

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: PreferAlignCpusByUncoreCache
3+
content_type: feature_gate
4+
_build:
5+
list: never
6+
render: false
7+
8+
stages:
9+
- stage: alpha
10+
defaultValue: false
11+
fromVersion: "1.32"
12+
---
13+
When `PreferAlignCpusByUncoreCache` is enabled while the CPU Manager Policy is set to `static`, containers within a `Guaranteed` pod will individually be aligned to an uncore cache group at a best-effort policy. This feature can optimize performance for certain cache-sensitive workloads by minimizing the cpu allocation across uncore caches.

content/en/docs/tasks/administer-cluster/cpu-management-policies.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ The following policy options exist for the static `CPUManager` policy:
268268
* `distribute-cpus-across-numa` (alpha, hidden by default) (1.23 or higher)
269269
* `align-by-socket` (alpha, hidden by default) (1.25 or higher)
270270
* `distribute-cpus-across-cores` (alpha, hidden by default) (1.31 or higher)
271+
* `prefer-align-cpus-by-uncorecache` (alpha, hidden by default) (1.32 or higher)
271272

272273
If the `full-pcpus-only` policy option is specified, the static policy will always allocate full physical cores.
273274
By default, without this option, the static policy allocates CPUs using a topology-aware best-fit allocation.
@@ -318,6 +319,20 @@ the benefit of reducing contention diminishes. Conversely, default behavior
318319
can help in reducing inter-core communication overhead, potentially providing
319320
better performance under high load conditions.
320321

322+
If the `prefer-align-cpus-by-uncorecache` policy is specified, the static policy
323+
will allocate CPU resources for individual containers such that all CPUs assigned
324+
to a container share the same uncore cache block (also known as the Last-Level Cache
325+
or LLC). By default, the `CPUManager` will tightly pack CPU assignments which can
326+
result in containers being assigned CPUs from multiple uncore caches. This option
327+
enables the `CPUManager` to allocate CPUs in a way that maximizes the efficient use
328+
of the uncore cache. Allocation is performed on a best-effort basis, aiming to
329+
affine as many CPUs as possible within the same uncore cache. If the container's
330+
CPU requirement exceeds the CPU capacity of a single uncore cache, the `CPUManager`
331+
minimizes the number of uncore caches used in order to maintain optimal uncore
332+
cache alignment. Specific workloads can benefit in performance from the reduction
333+
of inter-cache latency and noisy neighbors at the cache level. If the `CPUManager`
334+
cannot align optimally while the node has sufficient resources, the container will
335+
still be admitted using the default packed behavior.
321336

322337
The `full-pcpus-only` option can be enabled by adding `full-pcpus-only=true` to
323338
the CPUManager policy options.
@@ -334,3 +349,8 @@ The `distribute-cpus-across-cores` option can be enabled by adding
334349
`distribute-cpus-across-cores=true` to the `CPUManager` policy options.
335350
It cannot be used with `full-pcpus-only` or `distribute-cpus-across-numa` policy
336351
options together at this moment.
352+
353+
The `prefer-align-cpus-by-uncorecache` option can be enabled by adding the
354+
`prefer-align-cpus-by-uncorecache` to the `CPUManager` policy options. If
355+
incompatible options are used, the kubelet will fail to start with the error
356+
explained in the logs.

0 commit comments

Comments
 (0)