"No more processes."

Posted:
in macOS edited January 2014
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?? :confused:



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

  • Reply 1 of 11
    amorphamorph Posts: 7,112member
    Every OS has limits set somewhere. Stacks can only get so big, etc. A lot of the art of systems programming lies in setting those limits so that they neither get in the way of normal use nor allow the system to be overwhelmed or destabilized, or to become inefficient because some of the system's code or hardware only scales up so well.



    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>
  • Reply 2 of 11
    There's no pleasing some people.
  • Reply 3 of 11
    AFAIK all Unix systems have a limit. I think I've hit it a time or two. But only when all hell breaks loose.
  • Reply 4 of 11
    The process table size is probbally hardcoded in the sourcecode. Some versions of Unix allow you to modify these variables on the fly. I don't know if OSX supports that.
  • Reply 5 of 11
    emaneman Posts: 7,204member
    Why the hell do you have that many apps open anyway?
  • Reply 6 of 11
    amorphamorph Posts: 7,112member
    Scott H. wrote:



    [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>
  • Reply 7 of 11
    [quote]Originally posted by EmAn:

    <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. I was a little nutty last night I suppose.



    Thanks again!



    [ 12-06-2001: Message edited by: starfleetX ]</p>
  • Reply 8 of 11
    [quote]Originally posted by starfleetX:

    <strong>Does Mac OS X have a limit on the number of threads it can run?? :confused:



    .

    .

    .



    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' in answer to your inquiry. This means my system will support no more than 532 *simultaneous* processes. This number is likely to be slight;y lower as the OS will require a few to unravel the situation as you approach this max of 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>
  • Reply 9 of 11
    owencowenc Posts: 13member
    Didn't you already post this?



    <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
  • Reply 10 of 11
    Hey, thanks BarrySharp! It's nice to hear from an old-school AppleInsider. :cool:



    [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>
  • Reply 11 of 11
    hekalhekal Posts: 117member
    I did this on 10.0.4 and the system was just as speedy as ever. Launching new apps was slower than normal, but currently running apps chugged away without a burp.



    <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?? :confused:



    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>
Sign In or Register to comment.