@@ -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
272273If the `full-pcpus-only` policy option is specified, the static policy will always allocate full physical cores.
273274By 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
318319can help in reducing inter-core communication overhead, potentially providing
319320better 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
322337The `full-pcpus-only` option can be enabled by adding `full-pcpus-only=true` to
323338the 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.
335350It cannot be used with `full-pcpus-only` or `distribute-cpus-across-numa` policy
336351options 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