Re: Max number of pthreads in one process?
Re: Max number of pthreads in one process?
- Subject: Re: Max number of pthreads in one process?
- From: Eric Gouriou <email@hidden>
- Date: Mon, 19 May 2008 20:53:56 -0700
On May 19, 2008, at 11:52 AM, Mike wrote: Army Research Lab wrote:
[... way too many threads ...] I believe I read somewhere the max # of processes per thread on OS X is 256, although you may want to check that. I think I recall reading it somewhere in the Multithreading Guide.
It is 2500 on Leopard, per a recent discussion on the Java-Dev mailing list.
As in that discussion, I'll reiterate my (somewhat informed) opinion that getting anywhere close to that limit is a recipe for a performance disaster.
Eric
Begin forwarded message: From: Pratik Solanki <email@hidden> Date: April 11, 2008 2:01:34 PM PDT Subject: Re: Max Threads
To end this conversation, I tracked it down. 2560 is a kernel limit on the number of threads. Nothing to do with java or virtual memory or 32 vs 64-bit processes. This is a limit set in the kernel. If you download the xnu sources from http://www.macosforge.org/ and you'll see in osfmk/kern/mach_param.h #define THREAD_MAX 2560 /* Max number of threads */ So this ends the "curiosity" part of this discussion. As for your problem, I think everyone agrees that creating 2560 threads is a huge bug in the first place. You shouldn't be hitting this limit.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden