"No more processes."
I tried going through some (okay, A LOT) of Carbon and Cocoa (no Classic) apps to stress-test my Mac. Well, after a while I tried running 'top' in the terminal, I got the message "No more processes." WTF??
Does Mac OS X have a limit on the number of threads it can run??
So much for the world's most advanced Operating System...
Here are <a href="http://brad.project-think.com/movies/myRunningApps.mov" target="_blank">the apps I was running</a>.
Here's a shot of Terminal.app saying I <a href="http://brad.project-think.com/images/NoMoreProcesses.jpg" target="_blank">can't run "top" or "hostinfo"</a>.
Even the Process Viewer <a href="http://brad.project-think.com/images/ProcessViewerStuck.jpg" target="_blank">wouldn't work properly</a> because it relies on top.
Does anyone else have some info about this? <img src="graemlins/hmmm.gif" border="0" alt="[Hmmm]" />
Does Mac OS X have a limit on the number of threads it can run??

So much for the world's most advanced Operating System...

Here are <a href="http://brad.project-think.com/movies/myRunningApps.mov" target="_blank">the apps I was running</a>.
Here's a shot of Terminal.app saying I <a href="http://brad.project-think.com/images/NoMoreProcesses.jpg" target="_blank">can't run "top" or "hostinfo"</a>.
Even the Process Viewer <a href="http://brad.project-think.com/images/ProcessViewerStuck.jpg" target="_blank">wouldn't work properly</a> because it relies on top.
Does anyone else have some info about this? <img src="graemlins/hmmm.gif" border="0" alt="[Hmmm]" />
Comments
I don't think too many people are going to complain about a consumer OS that can "only" run 116 applications at once on consumer (i.e., personal computer) hardware. I can't imagine that Mac OS 9 would get anywhere close to that before it gave out less gracefully than OS X did.
Apple can probably adjust the max number of processes or threads allowed, per system or per user, without too much trouble. But why?
[ 12-06-2001: Message edited by: Amorph ]</p>
[quote]AFAIK all Unix systems have a limit. I think I've hit it a time or two. But only when all hell breaks loose.<hr></blockquote>
Sure. These appeared not long after it was discovered that a fork() bomb - whether deliberate or accidental - could bring a UNIX machine down within seconds if it was left unchecked.
Far better to have an artificial limit that allows the OS to recover gracefully and continue than to let user-space applications bring the whole system down.
In this case, that limit is almost certainly not going to be reached under normal circumstances.
The funny thing is, if John Siracusa had published something like this, there would probably be at least one thread crowing about how awesome OS X because it can run so many apps at once without getting fazed.
[ 12-06-2001: Message edited by: Amorph ]</p>
<strong>Why the hell do you have that many apps open anyway?</strong><hr></blockquote>Can't you read? I think I said: [quote]to stress-test my Mac.<hr></blockquote>
Anyway, thanks for the info guys. I don't know what the hell I was thinking at 3:30 in the morning anyway that got me to do that.
Thanks again!
[ 12-06-2001: Message edited by: starfleetX ]</p>
<strong>Does Mac OS X have a limit on the number of threads it can run??
.
.
.
Does anyone else have some info about this? <img src="graemlins/hmmm.gif" border="0" alt="[Hmmm]" /> </strong><hr></blockquote>
starfleetX:
As others have posted -- there are limits. For your enjoyment you can list many of these via the terminal.app command 'sysctl'. I give you a partial list of mine below.
Notice the 'kern.maxproc = 532'
You can modify some of these limits if you wish. See the sysctl man pages. I've extracted some of the examples from the sysctl man page for your enjoyment below.
EXAMPLES
For example, to retrieve the maximum number of processes allowed in the
system, one would use the follow request:
sysctl kern.maxproc
To set the maximum number of processes allowed in the system to 1000, one
would use the follow request:
sysctl -w kern.maxproc=1000
Information about the system clock rate may be obtained with:
sysctl kern.clockrate
Information about the load average history may be obtained with
sysctl vm.loadavg
Regards... Barry Sharp
Output from the sysctl command...
iMacDV% sysctl -a
kern.ostype = Darwin
kern.osrelease = 5.1
kern.osrevision = 199506
kern.version = Darwin Kernel Version 5.1:
Tue Oct 30 00:06:34 PST 2001; root:xnu/xnu-201.5.obj~1/RELEASE_PPC
kern.maxvnodes = 17200
kern.maxproc = 532
kern.maxfiles = 12288
kern.argmax = 65536
kern.securelevel = 1
kern.hostname = iMacDV
kern.hostid = 419377504
kern.clockrate: hz = 100, tick = 10000, profhz = 100, stathz = 100
kern.posix1version = 198808
kern.ngroups = 16
kern.job_control = 1
kern.saved_ids = 0
kern.boottime = Sun Dec 2 11:59:58 2001
[ 12-06-2001: Message edited by: Barry Sharp ]</p>
<a href="http://forums.macnn.com/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=46&t=001582" target="_blank">http://forums.macnn.com/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=46&t=001582</a>
Anyway, I was always curious as to how small dock items could get ... it seems to go on forever
[quote]Originally posted by owenc:
<strong>Didn't you already post this?
Anyway, I was always curious as to how small dock items could get ... it seems to go on forever</strong><hr></blockquote>Yes, yes, but I posted at MacNN too because I knew I'd get differring opinions here and there.
And if you want to know how small the Dock can get, have a look at this picture I just took. I dragged the contents of a folder to it and thus added 413 items. Whee!!!
<a href="http://brad.project-think.com/images/MegaDock.jpg" target="_blank">http://brad.project-think.com/images/MegaDock.jpg</a>
<img src="graemlins/bugeye.gif" border="0" alt="[Skeptical]" />
[ 12-08-2001: Message edited by: starfleetX ]</p>
<a href="http://www.hekal.org/pictures/wow.jpg" target="_blank">Click to see.</a>
[quote]Originally posted by starfleetX:
<strong>I tried going through some (okay, A LOT) of Carbon and Cocoa (no Classic) apps to stress-test my Mac. Well, after a while I tried running 'top' in the terminal, I got the message "No more processes." WTF??
Does Mac OS X have a limit on the number of threads it can run??
So much for the world's most advanced Operating System...
Here are <a href="http://brad.project-think.com/movies/myRunningApps.mov" target="_blank">the apps I was running</a>.
Here's a shot of Terminal.app saying I <a href="http://brad.project-think.com/images/NoMoreProcesses.jpg" target="_blank">can't run "top" or "hostinfo"</a>.
Even the Process Viewer <a href="http://brad.project-think.com/images/ProcessViewerStuck.jpg" target="_blank">wouldn't work properly</a> because it relies on top.
Does anyone else have some info about this? <img src="graemlins/hmmm.gif" border="0" alt="[Hmmm]" /> </strong><hr></blockquote>