|
6 | 6 | [id="understanding-process-id-limits_{context}"]
|
7 | 7 | = Understanding process ID limits
|
8 | 8 |
|
| 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 | + |
9 | 13 | In {product-title}, consider these two supported limits for process ID (PID) usage before you schedule work on your cluster:
|
10 | 14 |
|
11 | 15 | * Maximum number of PIDs per pod.
|
12 | 16 | +
|
13 | 17 | 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[] |
14 | 37 |
|
| 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[] |
15 | 44 | * Maximum number of PIDs per node.
|
16 | 45 | +
|
17 | 46 | 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[] |
18 | 48 |
|
19 | 49 | 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.
|
20 | 50 |
|
|
0 commit comments