Subject: Re: URGENT: Why is this happening?
To: Jon Ribbens <jon@oaktree.co.uk>
From: Rick Byers <rickb@iaw.on.ca>
List: netbsd-help
Date: 10/09/1997 14:41:04
On Thu, 9 Oct 1997, Jon Ribbens wrote:

> > If, on the other hand, you just have a really loaded web server with lots
> > of CGI's etc... You can increase MAXUSERS in your kernel config file and
> > recompile.  This will make a bigger File table.
> 
> Neat. So why's it called 'MAXUSERS'? ;-) We had it set to '4', and thought
> that this was overkill. (The machine never has more than 2 users logged in
> at once.) I presumed it was related to the number of ptys or something.

Yeah, it's sort of misleading.  All sorts of other constants are
calculated based on the 'estimated number of maximum simultaneous users' -
including the expected number of simultaneous processes - which in turn is
used in calculating the size of the file table.  This probably works great
when the role of the system is to support local users, but when it's a web
server, or e-mail server etc... you should set MAXUSERS much higher than
the 'estimated number of maximum users'.  I think 32 is the default...

> > Consult the options(4) man page for a little more detail.
> 
> I'd love to, but there doesn't appear to be one.

Oh, I guess that was put in after 1.2.1.  It doesn't have much information
on the MAXUSERS option anyway.  Hopefully we can get that fixed before
1.3.

> > I've had to increase the file table size beyond what it expects (we have
> > over 100 virtual hosts) by setting MAXUSERS=64, and NPROC=2048 (to increase
> > NPROC, I think I had to do a bit of source code modification).
> 
> I've increased MAXUSERS to 16 now, and set GATEWAY, and I'm hoping this will
> fixed my files problem, plus miscellaneous errors such as:
> 
> Sep 26 22:08:39 deimos /netbsd: mb_map full
> Oct  2 16:21:19 deimos /netbsd: 'swap' loses space (32)
> Oct  2 16:21:20 deimos /netbsd: rmfree: map 'swap' loses space (64)
> Oct  2 16:21:22 deimos last message repeated 135 times

I'm not sure about those specific messages, but 4 is definantly too low,
and likely to cause all sorts of problems.  If you still get occasional
warnings, try putting MAXUSERS back to the default of 32.  

Cheers,
	Rick

=========================================================================
Rick Byers                                      Internet Access Worldwide
rickb@iaw.on.ca                                		     System Admin
University of Waterloo, Computer Science                    (905)714-1400
http://www.iaw.on.ca/rickb/                         http://www.iaw.on.ca/