Skip to content

Commit fc73d7b

Browse files
authored
Merge pull request #48356 from nokia/KEP-4540-strict-cpu-reservation-doc
KEP-4540: CPUManager strict-cpu-reservation policy option documentation
2 parents 0c759e1 + 4e69977 commit fc73d7b

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

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

Lines changed: 17 additions & 1 deletion
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+
* `strict-cpu-reservation` (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,7 +319,6 @@ 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

321-
322322
The `full-pcpus-only` option can be enabled by adding `full-pcpus-only=true` to
323323
the CPUManager policy options.
324324
Likewise, the `distribute-cpus-across-numa` option can be enabled by adding
@@ -334,3 +334,19 @@ The `distribute-cpus-across-cores` option can be enabled by adding
334334
`distribute-cpus-across-cores=true` to the `CPUManager` policy options.
335335
It cannot be used with `full-pcpus-only` or `distribute-cpus-across-numa` policy
336336
options together at this moment.
337+
338+
The `reservedSystemCPUs` parameter in [KubeletConfiguration](/docs/reference/config-api/kubelet-config.v1beta1/),
339+
or the deprecated kubelet command line option `--reserved-cpus`, defines an explicit CPU set for OS system daemons
340+
and kubernetes system daemons. More details of this parameter can be found on the
341+
[Explicitly Reserved CPU List](/docs/tasks/administer-cluster/reserve-compute-resources/#explicitly-reserved-cpu-list) page.
342+
343+
By default this isolation is implemented only for guaranteed pods with integer CPU requests not for burstable and best-effort pods
344+
(and guaranteed pods with fractional CPU requests). Admission is only comparing the cpu requests against the allocatable cpus.
345+
Since the cpu limit is higher than the request, the default behaviour allows burstable and best-effort pods to use up the capacity
346+
of `reservedSystemCPUs` and cause host OS services to starve in real life deployments.
347+
348+
If the `strict-cpu-reservation` policy option is enabled, the static policy will not allow
349+
any workload to use the CPU cores specified in `reservedSystemCPUs`.
350+
351+
The `strict-cpu-reservation` option can be enabled by adding `strict-cpu-reservation=true` to
352+
the CPUManager policy options followed by removing the `/var/lib/kubelet/cpu_manager_state` file and restart kubelet.

0 commit comments

Comments
 (0)