Configuring PID limits for Docker

You can enable or change the process identifier (PID) limits for the Docker container by using the command-line utility

About this task

A process identity (PID) is a distinct number that the Linux® kernel assigns to each process or thread that is actively running on the system. The PID limit is a setting that can be enabled to control the number of processes that can run within one single container. If the value is too small, it can cause issues. For most workloads, a pod PID limit of 4096 is sufficient.

Table 1. Default values for Red Hat OpenShift Container Platform
Platform version Default value
IBM Cloud® Kubernetes Service 4.8 231129
Red Hat® OpenShift® Service onAmazon Web Services 4096 in Red Hat OpenShift 4.11 and later
Microsoft Azure self-managed Red Hat OpenShift Container Platform 1024

Procedure

  1. Log in to your Red Hat OpenShift Container Platform command line as an admin user.
  2. Run the following command.
    oc debug node/$NODE_NAME
    chroot /host
    vi /etc/crio/crio.conf
    
    The .conf file, which you need to edit, is opened.
  3. Insert the following line in the file and then save the file.
    pids_limit =<new value>
  4. Run the following commands to restart services and worker nodes.
    systemctl daemon-reload
    systemctl restart crio
    shutdown -r now