What's the Maximum Threads that Linux can Devote to a Process?

As it happens, Linux doesn't have a separate threads per process limit, just a limit on the total number of processes on the system (threads are essentially just processes with a shared address space on Linux). You can view them like this:

cat /proc/sys/kernel/threads-max

The default is the number of memory pages/4. You can increase these values, using the following:

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

There is also a limit on the number of processes (and hence threads) that a single user may create, see ulimit/getrlimit for details regarding these limits.

It's really that simple. Part of what makes Linux so nice is that it can be this flexible and scalable with hardware, and here you can see what that looks like!

Till next time!

Keep up with us on twitter @serversuit for more articles and product updates! 

May 04 2020

Add or review comments

Please leave your comment

Existing comments

Comments 0


Get notified about new publications and product updates.
Please note we do not share information to anyone.