Skip to content

Commit 663b5c7

Browse files
authored
Merge pull request #91004 from mburke5678/nodes-pid-limit
OCPBUGS33047: Query with CRI-O pids_limit and how are the pods with multiple containers treated.
2 parents 497fb66 + c5995db commit 663b5c7

5 files changed

+50
-2
lines changed

modules/cnf-configuring-kubelet-nro.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
:_module-type: PROCEDURE
66
[id="cnf-configuring-kubelet-config-nro_{context}"]
7-
= Creating a KubeletConfig CRD
7+
= Creating a KubeletConfig CR
88

99
The recommended way to configure a single NUMA node policy is to apply a performance profile. Another way is by creating and applying a `KubeletConfig` custom resource (CR), as shown in the following procedure.
1010

modules/create-a-kubeletconfig-crd-to-edit-kubelet-parameters.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
:_mod-docs-content-type: PROCEDURE
77
[id="create-a-kubeletconfig-crd-to-edit-kubelet-parameters_{context}"]
8-
= Creating a KubeletConfig CRD to edit kubelet parameters
8+
= Creating a KubeletConfig CR to edit kubelet parameters
99

1010
The kubelet configuration is currently serialized as an Ignition configuration, so it can be directly edited. However, there is also a new `kubelet-config-controller` added to the Machine Config Controller (MCC). This lets you use a `KubeletConfig` custom resource (CR) to edit the kubelet parameters.
1111

modules/risks-setting-higher-process-id-limits.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,15 @@ If you are running a large number of pods per node, and you have a high `podPids
1414

1515
To find the maximum number of pods that you can run simultaneously on a single node without exceeding the PID maximum for the node, divide 3,650,000 by your `podPidsLimit` value. For example, if your `podPidsLimit` value is 16,384, and you expect the pods to use close to that number of process IDs, you can safely run 222 pods on a single node.
1616

17+
ifdef::openshift-enterprise,openshift-origin[]
18+
[NOTE]
19+
====
20+
Memory, CPU, and available storage can also limit the maximum number of pods that can run simultaneously, even when the `podPidsLimit` value is set appropriately.
21+
====
22+
endif::openshift-enterprise,openshift-origin[]
23+
ifdef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
1724
[NOTE]
1825
====
1926
Memory, CPU, and available storage can also limit the maximum number of pods that can run simultaneously, even when the `podPidsLimit` value is set appropriately. For more information, see "Planning your environment" and "Limits and scalability".
2027
====
28+
endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]

modules/sd-understanding-process-id-limits.adoc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,45 @@
66
[id="understanding-process-id-limits_{context}"]
77
= Understanding process ID limits
88

9+
ifdef::openshift-enterprise,openshift-origin[]
10+
A process identifier (PID) is a unique identifier assigned by the Linux kernel to each process or thread currently running on a system. The number of processes that can run simultaneously on a system is limited to 4,194,304 by the Linux kernel. This number might also be affected by limited access to other system resources such as memory, CPU, and disk space.
11+
endif::openshift-enterprise,openshift-origin[]
12+
913
In {product-title}, consider these two supported limits for process ID (PID) usage before you schedule work on your cluster:
1014

1115
* Maximum number of PIDs per pod.
1216
+
1317
The default value is 4,096 in {product-title} 4.11 and later. This value is controlled by the `podPidsLimit` parameter set on the node.
18+
ifdef::openshift-enterprise,openshift-origin[]
19+
+
20+
You can view the current PID limit on a node by running the following command in a `chroot` environment:
21+
+
22+
[source,terminal]
23+
----
24+
sh-5.1# cat /etc/kubernetes/kubelet.conf | grep -i pids
25+
----
26+
+
27+
.Example output
28+
[source,terminal]
29+
----
30+
"podPidsLimit": 4096,
31+
----
32+
+
33+
You can change the `podPidsLimit` by using a `KubeletConfig` object. See "Creating a KubeletConfig CR to edit kubelet parameters".
34+
+
35+
Containers inherit the `podPidsLimit` value from the parent pod, so the kernel enforces the lower of the two limits. For example, if the container PID limit is set to the maximum, but the pod PID limit is `4096`, the PID limit of each container in the pod is confined to 4096.
36+
endif::openshift-enterprise,openshift-origin[]
1437
38+
ifdef::openshift-enterprise,openshift-origin[]
39+
* Maximum number of PIDs per node.
40+
+
41+
The default value depends on node resources. In {product-title}, this value is controlled by the `systemReserved` parameter in a kubelet configuration, which reserves PIDs on each node based on the total resources of the node. For more information, see "Allocating resources for nodes in an {product-title} cluster".
42+
endif::openshift-enterprise,openshift-origin[]
43+
ifdef::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
1544
* Maximum number of PIDs per node.
1645
+
1746
The default value depends on link:https://access.redhat.com/documentation/en-us/openshift_container_platform/4.18/html-single/nodes/index#nodes-nodes-resources-configuring[node resources]. In {product-title}, this value is controlled by the link:https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#system-reserved[`--system-reserved`] parameter, which reserves PIDs on each node based on the total resources of the node.
47+
endif::openshift-dedicated,openshift-rosa,openshift-rosa-hcp[]
1848

1949
When a pod exceeds the allowed maximum number of PIDs per pod, the pod might stop functioning correctly and might be evicted from the node. See link:https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals-and-thresholds[the Kubernetes documentation for eviction signals and thresholds] for more information.
2050

nodes/nodes/nodes-nodes-resources-configuring.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ To manually set resource values, you must use a kubelet config CR. You cannot us
2020

2121
include::modules/nodes-nodes-resources-configuring-about.adoc[leveloffset=+1]
2222

23+
include::modules/sd-understanding-process-id-limits.adoc[leveloffset=+1]
24+
25+
[role="_additional-resources"]
26+
.Additional resources
27+
28+
* xref:../../machine_configuration/machine-configs-custom.adoc#create-a-kubeletconfig-crd-to-edit-kubelet-parameters_machine-configs-custom[Creating a KubeletConfig CR to edit kubelet parameters]
29+
* xref:../../nodes/nodes/nodes-nodes-resources-configuring.adoc#nodes-nodes-resources-configuring[Allocating resources for nodes in an {product-title} cluster]
30+
31+
include::modules/risks-setting-higher-process-id-limits.adoc[leveloffset=+2]
32+
2333
include::modules/nodes-nodes-resources-configuring-auto.adoc[leveloffset=+1]
2434

2535
include::modules/nodes-nodes-resources-configuring-setting.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)