Maximum number of threads per process in Linux?

前端 未结 16 3152
轮回少年
轮回少年 2020-11-22 02:16

What is the maximum number of threads that can be created by a process under Linux?

How (if possible) can this value be modified?

16条回答
  •  我寻月下人不归
    2020-11-22 02:43

    You can see the current value by the following command- cat /proc/sys/kernel/threads-max

    You can also set the value like

    echo 100500 > /proc/sys/kernel/threads-max

    The value you set would be checked against the available RAM pages. If the thread structures occupies more than 1/8th) of the available RAM pages, thread-max would be reduced accordingly.

提交回复
热议问题