7.4) What purpose does the maxusers variable serve?

The maxusers variable has nothing to do with the number of user allowed on a system. It's one big knob that scales a number of other parameters simultaneously. The standard settings and derivations are more or less as follows, using /etc/system syntax:

	* The big knob, scales automatically
	set maxusers = <amount of available physical memory in MB>

* Maximum number of allowable processes; currently at most 30000 set max_nprocs = 10 + 16 * maxusers

* Max processes per user (5 are reserved for the super user) set maxuprc = max_nprocs - 5;

* Number of quota structures (need one per user per filesystem * w/ quotas) set ndquot = maxusers * NMOUNT / 4 + max_nprocs

* Maximum size of the directory name lookup cache (DNLC) set ncsize = 4 * (max_nprocs + maxusers) + 320 set ufs_ninode = ncsize

PREV INDEX NEXT