From owner-freebsd-questions Tue Apr 27 11:27:24 1999 Delivered-To: freebsd-questions@freebsd.org Received: from oconnor.inktomi.com (oconnor.inktomi.com [209.1.33.67]) by hub.freebsd.org (Postfix) with ESMTP id 9CD5814D77 for ; Tue, 27 Apr 1999 11:27:22 -0700 (PDT) (envelope-from bevans@oconnor.inktomi.com) Received: (from bevans@localhost) by oconnor.inktomi.com (8.8.7/8.8.7) id LAA22681 for questions@freebsd.org; Tue, 27 Apr 1999 11:56:41 -0700 Message-ID: <19990427115641.A22596@oconnor.inktomi.com> Date: Tue, 27 Apr 1999 11:56:41 -0700 From: Brennan Evans To: questions@freebsd.org Subject: limit on max number of mbufs? Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi all, How do I tune up the maximum number of mbufs on FreeBSD 3.1? I'm running into what seems to be a 16k buffer limit when trying to do some FTP tests around here. thank you, -- brennan ------------------------------------------------------------------------- Brennan Evans, bevans@inktomi.com, Inktomi Corporation, (650) 653-2990 [ . . . ] On Tue, Apr 27, 1999 at 12:49:25AM -0700, Brennan Evans wrote: > > I already tried the recompile. USENET seems to indicate that > mbufs is controled by 4*NMBCLUSTERS, so I would expect something > larger than the 16k max mbufs that I am currently seeing. Is > there another way to bump this up? > > I had tried setting NMBCLUSTERS huge before sending the previous > email. (we've always had maxusers set to 512). > > maxusers 512 > options "NMBCLUSTERS=(16*1024)" # huge (and experimental) > > BTW: sysctl -a | grep "tcp.*space" > net.inet.tcp.sendspace: 32768 > net.inet.tcp.recvspace: 32768 > > >From the output below it appears that the mbuf clusters themselves > are not saturated, but that I've maxed out on the available mbufs, > possible? > [ . . . ] > > > proxying FTP causes frequent errors returned to the client. > > > > > > Change #1: > > > > > > The kernel defaults for ephemeral ports lie in the range. > > > > > > net.inet.ip.portrange.first: 1024 > > > net.inet.ip.portrange.last: 5000 > > > > > > The logical range should be somewhat larger [Stevens]: > > > > > > net.inet.ip.portrange.first: 1024 > > > net.inet.ip.portrange.last: 49000 > > > > > > Change #2: > > > > > > Fixing the first problem leads to another tuning problem. > > > Still, the rate is so high that we burn up the available > > > mbufs. At least now the errors are transient (though > > > often). > > > > > > ts-bsd2# netstat -m > > > 16426/16736 mbufs in use: > > > 358 mbufs allocated to data > > > 16068 mbufs allocated to packet headers > > > 288/646/8704 mbuf clusters in use (current/peak/max) > > > 3384 Kbytes allocated to network (77% in use) > > > 0 requests for memory denied > > > 0 requests for memory delayed > > > 0 calls to protocol drain routines [ . . . ] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message