*BSD News Article 62646


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!uunet!in2.uu.net!newsfeed.internetmci.com!news.mathworks.com!fu-berlin.de!news.belwue.de!news.uni-stuttgart.de!uni-regensburg.de!newsserv.uni-bayreuth.de!uni-erlangen.de!news.tu-chemnitz.de!irz401!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: too many open files
Date: 2 Mar 1996 19:35:25 GMT
Organization: Private BSD site, Dresden
Lines: 50
Message-ID: <4ha7tt$af@uriah.heep.sax.de>
References: <4ghcfd$350@interport.net> <4gj0km$rf@uriah.heep.sax.de> <davidtay-2702961052250001@206.65.200.5>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.3

davidtay@interport.net (David Tay) writes:

> > Did you try increasing ``maxusers'' in the config file?
> 
> Yes. I set WuFTPD to accept only 30 clients and Apache to serve only a
> MaxClients of 50.

That doesn't answer my questions.  For a heavy-loaded server running
many processes, you are supposed to bump the ``maxusers'' number in
the _kernel_config_file_.  This is the file under /sys/i386/conf/
you've been configuring your kernel from.  (I hope you aren't running
the GENERIC kernel on such a machine, are'ya?)

> Could it be the lack of virtual memory? My swap is only 32 mb but I never
> did like swap and wouldn't have allocated any swap at all if FreeBSD would
> let me. I do have enough RAM though (96 mb).

If you don't like swap, then don't run a system with virtual
memory. :)

FreeBSD uses ``lazy swap'', basically meaning that your total amount
of virtual memory is (roughly) swap + RAM.  If it were using ``eager
swap'' (being on the safe side of life), you'd only have 32 MB VM in
your constellation, since all RAM must be backed with swap.

The cost of lazy swap is that the system might encounter situations
where it is running out of swap for memory that has already been
granted to processes.  It has to kill random processes then.  You
should find about these situations in your syslog message file, watch
out for things like ``out of swap'', ``process <pid> killed by ...''.

> Lastly, I hope you can tell me this: where would I go to get information
> on how to read kernel messages? yes, I'm a unix newbie.

Whaddaymean?  Are you asking where the messages are being collected?

You can use dmesg(8) to read the most recent messages, and you should
have a look into /etc/syslog.conf.  This file is instructing syslogd
on where to drop the received messages to.  By default, all kernel
messages are being stored (among other things) in /var/log/messages.

Or are you asking on the semantics of the messages?  If so, please
quote an example of what you don't understand.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)