John.D
John.D

Reputation: 21

maximum number of threads allowed to run

Maximum number of threads in my linux system is 93946. I got this value from cat /proc/sys/kernel/threads-max. But when I create around 32768 threads I got error

cannot create new native threads

Upvotes: 1

Views: 10158

Answers (2)

der.Softwerker
der.Softwerker

Reputation: 31

please check out /proc/sys/kernel/pid_max. Since threads have their own pid, this value limits the maximum number of threads too.

Upvotes: 0

jijinp
jijinp

Reputation: 2672

You can find max thread with command:

sysctl -a| grep kernel.threads-max

Edit the /etc/sysctl.conf file and add new value

kernel.threads-max = 93946

Make change effective with sysctl -p

Upvotes: 3

Related Questions