Best Answer: How Many Threads Can a Process Have Linux?
Contents Each of Your Threads Will Get This Amount of Memory (10Mb) Assigned for It’s Stack. with a 32Bit Program and a Maximum Address Space of 4Gb, That Is a...
Each of your threads will get this amount of memory (10MB) assigned for it’s stack. With a 32bit program and a maximum address space of 4GB, that is a maximum of only 4096MB / 10MB = 409 threads !!!
Is there a limit to number of threads?
Creating threads gets slower
For the 32-bit JVM, the stack size appears to limit the number of threads you can create. This may be due to the limited address space. In any case, the memory used by each thread’s stack add up. If you have a stack of 128KB and you have 20K threads it will use 2.5 GB of virtual memory.
How many threads can a process handle?
A thread is the unit of execution within a process. A process can have anywhere from just one thread to many threads.