Max number of Process and Threads

Max number of Process and Threads

Post by SW » Fri, 19 Jul 2002 19:28:58



Dear all,

Just did a quick search, I was able to find the max number of threads I can
create is ULONG_MAX. Is this really true? How about Max number of process I
can create in the system? Assuming memory is not a restriction.

Thanks
SW

 
 
 

Max number of Process and Threads

Post by Daniel Hartmeie » Fri, 19 Jul 2002 20:53:05



> Just did a quick search, I was able to find the max number of threads I can
> create is ULONG_MAX. Is this really true? How about Max number of process I
> can create in the system? Assuming memory is not a restriction.

ulimit(1), login.conf(5). You won't reach ULONG_MAX, even on a 32-bit
machine it's still 2^32-1, and each thread (or process) will consume more
than one byte of memory. pids are 32-bit, too.

If you plan to create such a huge amount of threads or processes, maybe
the design is wrong.

Daniel

 
 
 

Max number of Process and Threads

Post by tedu » Sat, 20 Jul 2002 03:42:54



> Just did a quick search, I was able to find the max number of threads I can
> create is ULONG_MAX. Is this really true? How about Max number of process I
> can create in the system? Assuming memory is not a restriction.

All my pids are under 64K, which is the standard limit.  Maybe higher ones
are allocated if needed, but if you have that many processes, your system
will be unusably slow.

--
If you ever would give them a helping hand,
You can be sure they'll chop off the arm.
Never, ever, never trust a Klingon; you will always regret it.