Welcome to the Linux Foundation Forum!

Why kernel.pid_max = 4194304 on my system?

"For historical reasons, the largest PID has been limited to a 16-bit number, or 32768. But for some reason on my system the kernel.pid_max = 4194304 . How that possible.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Answers

  • Posts: 916

    Because you are on a 64 bit system :) and using a more recent kernel. The sentence could use more elatboration.

    1. r9:/home/coop>ps
    2. PID TTY TIME CMD
    3. 54249 pts/2 00:00:00 bash
    4. 80648 pts/2 00:00:00 ps
    5. r9:/home/coop>cat /proc/sys/kernel/pid_max
    6. 4194304
    7. r9:/home/coop>

    Note that 4194304=4*1024*1024, or 2^24 I don't know the historical specifics that made it this many bits.

  • Thanks for answering.

  • Posts: 12

    I'm currently running on OpenSUSE Tumbleweed with kernel 6.3.7-1-default (as per uname -a) on a 64-bit machine, but I still see the specified 32768 max_pid. Is the bit architecture relevant to this or perhaps the distribution maintainers are responsible for keeping this variable at a lower value?

  • Posts: 916

    Probably a distro thing, or the way they configure their kernel

  • Posts: 12

    Thank you for clarifying that!

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training