From owner-freebsd-stable Wed Aug 21 9:31: 1 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 0747B37B400; Wed, 21 Aug 2002 09:30:56 -0700 (PDT) Received: from pump3.york.ac.uk (pump3.york.ac.uk [144.32.128.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB6F443E42; Wed, 21 Aug 2002 09:30:54 -0700 (PDT) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: from ury.york.ac.uk (ury.york.ac.uk [144.32.108.81]) by pump3.york.ac.uk (8.10.2/8.10.2) with ESMTP id g7LGUm113206; Wed, 21 Aug 2002 17:30:52 +0100 (BST) Received: from ury.york.ac.uk (localhost.york.ac.uk [127.0.0.1]) by ury.york.ac.uk (8.12.3/8.12.3) with ESMTP id g7LGUmv6023609; Wed, 21 Aug 2002 17:30:48 +0100 (BST) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: from localhost (gavin@localhost) by ury.york.ac.uk (8.12.3/8.12.3/Submit) with ESMTP id g7LGUmee023606; Wed, 21 Aug 2002 17:30:48 +0100 (BST) X-Authentication-Warning: ury.york.ac.uk: gavin owned process doing -bs Date: Wed, 21 Aug 2002 17:30:48 +0100 (BST) From: Gavin Atkinson To: Cc: Subject: mbuf usage - how do i track it down? Message-ID: 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 Hi, I'm having problems on 4.6-STABLE, with running out of mbufs. I have in the past had problems with running out of mbuf clusters, but have since upped that from 1024 to 4096 with kern.ipc.nmbclusters="4096" in /boot/loader.conf. I now find I am running out of mbufs. endor# netstat -m 16288/16384/16384 mbufs in use (current/peak/max): 16227 mbufs allocated to data 3 mbufs allocated to packet headers 58 mbufs allocated to socket names and addresses 291/1742/4096 mbuf clusters in use (current/peak/max) 7580 Kbytes allocated to network (61% of mb_map in use) 30504 requests for memory denied 9746 requests for memory delayed 12606 calls to protocol drain routines I have upped it to 32768 with kern.ipc.nmbufs="32768" in /boot/loader.conf, but as soon as I did that I found I was frequently getting "No buffer space available" messages while trying to create some outgoing TCP connections. However, after commenting the line out and rebooting, i am still getting these messages so they may not be related. This box is acting as a nat gateway, with an adsl usb mopdem attached, and an fxp card for the internal network. Currently I have a maximum uptiime of around 8 days before I need to reboot because of the leaking mbufs. So how do I find out what is actually allocating these mbufs. Something seems to be leaking them. How do I try to debug this? I need to know what is allocating these. The mbuf(9) man page reffered to in stable doesn't exist, and under current it doesn't really provide any pointers as to where i should go from here. I don't really want to just blindly up the number of mbufs, something is obviously leaking here. I want to solve the problem, by finding out what. I can give access to this box if needed, it is one ill machine. Gavin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message