SUMMARY: Max number of processes per user

From: Casper Dik (casper@holland.Sun.COM)
Date: Thu Dec 04 1997 - 07:52:25 CST

I feel compelled to protest about the misinformation contained
in this summary. While it's correctly summarized, the information
contained in the summary is misleading and sometimes even incorrect.

Unfortunately, I notice a lot of this on the Sun manager's mailinglist
lately. I believe that there is a duty for those people who
summarize to do more stringent fact finding rather than listing all
suggestions. And never summarize before you've tested the possible

There seems to be a lot of confusion about kernel parameters, and I
apologize that the Solaris FAQ is still lacking in that respect.

Here's an attempt to rectify some of it.

>In short, you edit /etc/system and add the line
> set maxuprc=500 (default is 100)
>and then reboot.

The default is not "100" the default is "max_nprocs - 5", max_nprocs
is set from maxusers. (10 + 16 * maxusers).

Other variables scaled w/ maxusers are ndquot, ncsize and ufs_ninode

maxusers is roughly equal to the number of megabytes of physical memory

So for a 64MB machine this comes out to roughly 1000 processes, something
you're not likely to run out of (as you're not likely to run 1000 processes
in 64 MB of memory)

Further comments:

>The parameters to adjust are:
> set maxusers=300

You can set this, typically there's no need to increase it.
You may waste a lot of pinned down kernel memory this way.

> set maxuprc=64

You can set this, typically only when you want to *limit* the number of
processes per user.

> set max_nprocs=3096

Max 30000, but again this setting decreases the value in this example
(w/ maxusers = 300, the value becomes 30000)

> set pt_cnt=768

Lots of ptys, will work, do you need this many (you get only 4 processes
per pty)

> set npty=768

*WRONG* you don't need to set this. This will give you BSD ptys that you
don't need. besides, you can only have 176 BSD ptys and no more.
So the setting of 768 is pointless and just wastes kernel
memory. Leave it at 48.

But if you increase the number of BSD ptys, you also need to change

        ptsl 0 47 ldterm ttcompat

        ptsl 0 <npty-1> ldterm ttcompat

And this setting here is *COMPLETELY BOGUS*:

> set nautopush=768

This setting never needs to be increased.

It should be identical to the number of lines in /etc/iu.ap and it only
needs to be increased if you add to that file and that only happens
when you add STREAMs devices that require autopush.

The default of 32 is more than sufficient for any need.

There's also a religion that believes in increasing sadcnt. There's no
need to increase those either.

There are some of Sun's SRDB and infodocs that have misinformation in it,
we're in the process of correcting them.


This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:11 CDT