sysctl.si › Parameters › kernel.pid_max

kernel.pid_max

Highest process ID. Limits total processes and threads.

Default
32768 or 4194304
Typical value
4194304 on container hosts

When to change it

Raise it on hosts that run thousands of containers or threads.

Check the current value

sysctl kernel.pid_max

Change it until the next reboot

sudo sysctl -w kernel.pid_max=4194304

Make it permanent

echo "kernel.pid_max = 4194304" | sudo tee /etc/sysctl.d/99-custom.conf
sudo sysctl --system

Related parameters

kernel.kptr_restrict · kernel.yama.ptrace_scope

Generate a full sysctl config for your server

Values are starting points. Test on a staging machine and measure before and after.