Reviewed-by: Gergo-Bence Lorincz <a200452876@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com> Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
5.8 KiB
Changing Process ID Limits (kernel.pid_max)
Context
Process IDs (PIDs) are a fundamental resource on nodes. It is trivial to hit the task limit without hitting any other resource limits, which can then cause instability to a host machine.
You can adjust the PID limit (kernel.pid_max) according to service requirements.
kernel.pid_max Defaults
OS |
Clusters of 1.17.9 and Earlier |
Clusters of 1.17.17 and Later |
|
Nodes Created on or Before January 30, 2022 |
Nodes Created After January 30, 2022 |
||
EulerOS 2.9 |
N/A |
4194304 |
4194304 |
HCE OS 2.0 |
N/A |
N/A |
4194304 |
Ubuntu 22.04 |
N/A |
N/A |
4194304 |
Viewing kernel.pid_max
Log in to the node and run the following command to obtain the value of kernel.pid_max:
sysctl kernel.pid_max
Command output:
kernel.pid_max = 32768
Change kernel.pid_max, if necessary, as instructed in Changing kernel.pid_max of a Node.
Checking Node PIDs
Log in to the node and run the following command to check how many PIDs are in use:
ps -eflL | wc -l
Command output:
691
Changing kernel.pid_max of a Node
Log in to the node and run the following command. 4194304 indicates the value of kernel.pid_max and is used as an example here.
echo kernel.pid_max = 4194304 >> /etc/sysctl.conf && sysctl -p
Run the following command to check whether the returned value is the same as that you configured:
sysctl kernel.pid_max
Command output:
kernel.pid_max = 4194304