From owner-freebsd-hackers Thu Jul 12 19:36:44 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ussenterprise.ufp.org (ussenterprise.ufp.org [208.185.30.210]) by hub.freebsd.org (Postfix) with ESMTP id 28D8A37B403 for ; Thu, 12 Jul 2001 19:36:41 -0700 (PDT) (envelope-from bicknell@ussenterprise.ufp.org) Received: (from bicknell@localhost) by ussenterprise.ufp.org (8.11.1/8.11.1) id f6D2aah78066; Thu, 12 Jul 2001 22:36:36 -0400 (EDT) (envelope-from bicknell) Date: Thu, 12 Jul 2001 22:36:36 -0400 From: Leo Bicknell To: Mike Silbersack Cc: Alfred Perlstein , Matt Dillon , Leo Bicknell , hackers@FreeBSD.ORG Subject: Re: Network performance tuning. Message-ID: <20010712223636.B77503@ussenterprise.ufp.org> Mail-Followup-To: Leo Bicknell , Mike Silbersack , Alfred Perlstein , Matt Dillon , Leo Bicknell , hackers@FreeBSD.ORG References: <20010712211819.D6664@sneakerz.org> <20010712212051.K21859-100000@achilles.silby.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010712212051.K21859-100000@achilles.silby.com>; from silby@silby.com on Thu, Jul 12, 2001 at 09:27:54PM -0500 Organization: United Federation of Planets 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 Thu, Jul 12, 2001 at 09:27:54PM -0500, Mike Silbersack wrote: > I'd like to do this also, provided that we also change the mbuf to cluster > ratio from 4/1 to 2/1. This will ensure that the doubled per-socket > memory usage doesn't cause systems to run out of clusters earlier than > before. This is sort of backwards. Today we have (kern/uipc_mbuf.c): #ifndef NMBCLUSTERS #define NMBCLUSTERS (512 + MAXUSERS * 16) #endif TUNABLE_INT_DECL("kern.ipc.nmbclusters", NMBCLUSTERS, nmbclusters); TUNABLE_INT_DECL("kern.ipc.nmbufs", NMBCLUSTERS * 4, nmbufs); What you actually want to do is double the number of clusters: #define NMBCLUSTERS (512 + MAXUSERS * 32) And then do half as many mbuf's per cluster: TUNABLE_INT_DECL("kern.ipc.nmbufs", NMBCLUSTERS * 2, nmbufs); I think. Here's a sample from a system I run (netstat -m): 151/5024/18432 mbufs in use (current/peak/max): 128/4608/4608 mbuf clusters in use (current/peak/max) As you can see, clusters peaked, while mbuf's were only 1/3 used. I want to see some data points from other types of servers before saying this really is a good idea. That said, so far every system I've checked runs out of clusters before mbuf's. Can some other people check systems in various forms of use? -- Leo Bicknell - bicknell@ufp.org Systems Engineer - Internetworking Engineer - CCIE 3440 Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message