From owner-freebsd-stable@FreeBSD.ORG Wed Jun 25 18:54:44 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F97C37B401 for ; Wed, 25 Jun 2003 18:54:43 -0700 (PDT) Received: from godel.mtl.distributel.net (nat.MTL.distributel.NET [66.38.181.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1E0A43FF9 for ; Wed, 25 Jun 2003 18:54:42 -0700 (PDT) (envelope-from bmilekic@technokratis.com) Received: from godel.mtl.distributel.net (localhost [127.0.0.1]) h5PLvhBS002541; Wed, 25 Jun 2003 21:57:43 GMT (envelope-from bmilekic@technokratis.com) Received: (from bmilekic@localhost) by godel.mtl.distributel.net (8.12.9/8.12.9/Submit) id h5PLvhe5002540; Wed, 25 Jun 2003 21:57:43 GMT X-Authentication-Warning: godel.mtl.distributel.net: bmilekic set sender to bmilekic@technokratis.com using -f Date: Wed, 25 Jun 2003 21:57:43 +0000 From: Bosko Milekic To: John B?ckstrand Message-ID: <20030625215743.GA2506@technokratis.com> References: <000b01c33b7e$bc37fdd0$0000fea9@sandos> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000b01c33b7e$bc37fdd0$0000fea9@sandos> User-Agent: Mutt/1.4.1i cc: freebsd-stable@freebsd.org Subject: Re: Mbuf Clusters on 4.8 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2003 01:54:44 -0000 On Thu, Jun 26, 2003 at 03:03:20AM +0200, John B?ckstrand wrote: > Ive been googling quite a bit now for problems with > running out of mbuf > clusters. Im basically sending a 30k datachunk down > 1000-4000 connections, > but 1000 is more than enough to quickly fill upp 8192 > mbuf clusters. I also > tried setting maximum amount of mbuf clusters to 65536, > but that only made > the box hard-wire 86MB of 96MB RAM, making it just as > unsuable as a dead > machine. > > Of course, when the machine runs out of mbuf clusters, > it dies. I also found > this with google: > > "Finally, the fact that FreeBSD 3.x panics when it runs > out of > mbuf clusters is a well-known problem. The solution is > to not > let it run out of mbuf clusters by configuring a > sufficient > number for them." > > >From this it sounds as it is a problem that should be > fixed, but it > obviously isnt in 4.8. Is this behaviour now considered > acceptable? And if > so, doesnt this make FreeBSD extremely easy to kill > using a simple > DOS-attack? Is this "fixed" in any way on 5.1? > > --- > John B?ckstrand It's not panicking, it's running out of resources. Whenever you have this sort of problem you need to provide more information, there is absolutely no way I can help you like this. You need to, at the very minimum, give us 'netstat -m' output and make a serious attempt at figuring out what is consuming so many clusters. You could be running out of clusters but you could also be running out of memory before you run out of clusters, in which case you should probably _not_ increase nmbclusters and instead fix the underlying problem instead (re-work your application). In such a scenario, blindly bumping up nmbclusters can make the problem worse. Even if you had 'unlimited' (or dynamically growing) nmbclusters, you'd _still_ have the same problem and, what's more, it could actually render your system even more unusable as the machine would not be able to allocate memory for other more important uses. -- Bosko Milekic * bmilekic@technokratis.com * bmilekic@FreeBSD.org TECHNOkRATIS Consulting Services * http://www.technokratis.com/