Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Aug 1998 15:08:39 -0700 (PDT)
From:      Doug White <dwhite@resnet.uoregon.edu>
To:        "Gessner, Matt" <mattg@aiinet.com>
Cc:        "'questions'" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Kernel configuration
Message-ID:  <Pine.BSF.4.00.9808181505420.19286-100000@resnet.uoregon.edu>
In-Reply-To: <7283DE19D141D111AD0E00A0C95B1955CF1280@mail2.aiinet.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tue, 18 Aug 1998, Gessner, Matt wrote:

> I'm running 2.2.7-RELEASE, and I've already changed my kernel a bit to
> allow me to do a whole bunch of simultaneous connections, but I've
> probably done something wrong, because it ain't working.
> 
> Here's what I have:
> 
> P5-166 Gateway
> 32 MB RAM
> 2 GB disk, 850MB belongs to FreeBSD, of which 100MB is swap.
> PCI DEC Ethernet card
> 
> Here's how I've mangled my poor kernel:
>     maxusers 128
>     options CHILD_MAX=256
>     options OPEN_MAX=2048
>     options NMBCLUSTERS=4096
> 
> Here's how I've changed login.conf
> 
>     default and root both have unlimited child process and open file
> counts.
> 
> I've done a little poking around in param.c and don't see immediately
> that I've violated any rules by setting these limits the way I have.

Did you rebuild the capability database?

> When I type limits, I get the following info back:
> 
>     maxprocesses 2067
>     openfiles 4136

Did you do 'unlimit' first?  The shell put on some of it's limits on top
of the login.conf limits first.

> But I can't find anything anywhere that talks about tuning the kernel
> for doing this.

David or another hacker will have to comment but a lot of these are
controlled by 'maxusers'.

> My end goal is to be able to bring up about 1024 TCP connections
> outbound and route them back to the same box, for a total of 2048
> connections.
> 
> Right now, I run 1024 connections to the other system, and what happens
> is when the sockets are all connected, and the writes start to occur,
> FreeBSD
> just reboots the machine -- no messages anywhere.

Ouchie.

> Recently I uppped NMBCLUSTERS to 4096, but it didn't seem to fix the
> problem.
> That was based on some notes in the FAQ.

You're probably short of mbufs all right.  If you can, try opening fewer
connections, then closely watch netstat -m, this line in particular:

35/164 mbuf clusters in use

If the number after the slash (max mbufs used) gets near 4000, crank up
NMBCLUSTERS some more.

Check the mail archives for futher details, this has be discussed numerous
times prevously.

Doug White                              | University of Oregon  
Internet:  dwhite@resnet.uoregon.edu    | Residence Networking Assistant
http://gladstone.uoregon.edu/~dwhite    | Computer Science Major


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.00.9808181505420.19286-100000>