From owner-freebsd-hackers Wed May 29 19:36:26 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from patrocles.silby.com (d62.as10.nwbl0.wi.voyager.net [169.207.131.62]) by hub.freebsd.org (Postfix) with ESMTP id BDB3237B407 for ; Wed, 29 May 2002 19:36:16 -0700 (PDT) Received: from patrocles.silby.com (localhost [127.0.0.1]) by patrocles.silby.com (8.12.3/8.12.3) with ESMTP id g4U2bMOA016576; Wed, 29 May 2002 21:37:23 -0500 (CDT) (envelope-from silby@silby.com) Received: from localhost (silby@localhost) by patrocles.silby.com (8.12.3/8.12.3/Submit) with ESMTP id g4U2adGQ016573; Wed, 29 May 2002 21:37:22 -0500 (CDT) X-Authentication-Warning: patrocles.silby.com: silby owned process doing -bs Date: Wed, 29 May 2002 21:36:39 -0500 (CDT) From: Mike Silbersack To: Gary Stanley Cc: freebsd-hackers@freebsd.org Subject: Re: mbuf problems on 4.5/4.6-RC2 In-Reply-To: <5.1.1.2.2.20020529204459.00b39c48@208.141.46.254> Message-ID: <20020529213257.R15855-100000@patrocles.silby.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 29 May 2002, Gary Stanley wrote: > Hi. > > We have a webserver setup with 1 Intel Pro/1000 Gigabit Ethernet card. The > old server was using around 95mbit/s of traffic or so (sustained rate). We > decided to replace that card/machine with something that could handle the > high network load. The question would be, What's a good size for > NMBCLUSTERS? I want to be -sure- the box does not run out of mbufs during > the production phase. The old machine was on a fxp0 driver, mbufs set to > 65k due to network overhead. Are there limits to mbufs, as in a size limit? > > > Thanks. There is no good answer to your question, unfortunately. mbuf usage is not related to bandwidth, but rather to the number of simultaneous connections being handled. If you want to run some rough numbers, consider the following: net.inet.tcp.sendspace: 32768 (bytes) Each mbuf cluster is 2048 bytes. From those numbers, and knowledge of how many simultaneous connections you will be sustaining, you should be able to make a rough guess at the correct number of mbuf clusters to use. Beware about setting too high a number of mbuf clusters - there are DoS programs out there aimed at using all mbuf clusters available. If such a program is run, and you have mbuf clusters * 2048 > amount of ram, there could be big problems. Mike "Silby" Silbersack To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message