From owner-freebsd-questions Tue Aug 18 15:09:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA09410 for freebsd-questions-outgoing; Tue, 18 Aug 1998 15:09:19 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.144.32]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA09405 for ; Tue, 18 Aug 1998 15:09:17 -0700 (PDT) (envelope-from dwhite@resnet.uoregon.edu) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.8.5/8.8.8) with SMTP id PAA05595; Tue, 18 Aug 1998 15:08:40 -0700 (PDT) (envelope-from dwhite@resnet.uoregon.edu) Date: Tue, 18 Aug 1998 15:08:39 -0700 (PDT) From: Doug White To: "Gessner, Matt" cc: "'questions'" Subject: Re: Kernel configuration In-Reply-To: <7283DE19D141D111AD0E00A0C95B1955CF1280@mail2.aiinet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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