From owner-freebsd-stable Sun Jun 30 15: 6: 2 2002 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 8922037B418 for ; Sun, 30 Jun 2002 15:05:49 -0700 (PDT) Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.122.47]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CBC243E0A for ; Sun, 30 Jun 2002 15:05:48 -0700 (PDT) (envelope-from dwhite@resnet.uoregon.edu) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.11.3/8.10.1) with ESMTP id g5UM5rG14344; Sun, 30 Jun 2002 15:05:53 -0700 (PDT) Date: Sun, 30 Jun 2002 15:05:52 -0700 (PDT) From: Doug White To: Don Bowman Cc: "'freebsd-stable@freebsd.org'" Subject: Re: number mbufs / cluster In-Reply-To: Message-ID: <20020630150410.D13863-100000@resnet.uoregon.edu> X-All-Your-Base: are belong to us MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 29 Jun 2002, Don Bowman wrote: > > I have an application where there is lots of connections, > but packet sizes aren't that large. I'm running into the > problem where I need an enormous amount of clusters, > but the number of mbufs needed isn't as big: > > $ netstat -m > 141164/141200/512000 mbufs in use (current/peak/max): > 141163 mbufs allocated to data > 1 mbufs allocated to fragment reassembly queue headers > 127997/128000/128000 mbuf clusters in use (current/peak/max) > 291300 Kbytes allocated to network (10% of mb_map in use) > 121192 requests for memory denied holy cow. How much memory does this thing have and what did you do to abuse it soo much? :-) I didn't think you could jack those values that high and not get panics. > Is there a way to change the number of mbufs allocated per > cluster? Is this a good thing to do for an application like this? > As you can see, I've got quite a bit of memory allocated to the > network here, and I can't really spare any more. Clusters are allocated as needed, usually one to a packet if it exceeds the in-mbuf buffer size. You might try dropping the socket send/recv buffer size to get you more room, and buying some more bandwidth. Also make sure you aren't getting massive packet loss going out so packets are bottling up in the kernel. Doug White | FreeBSD: The Power to Serve dwhite@resnet.uoregon.edu | www.FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message