From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 8 03:11:40 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C402716A4B3 for ; Wed, 8 Oct 2003 03:11:40 -0700 (PDT) Received: from smtpzilla1.xs4all.nl (smtpzilla1.xs4all.nl [194.109.127.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A7B743F85 for ; Wed, 8 Oct 2003 03:11:37 -0700 (PDT) (envelope-from peter.bozarov@moniforce.com) Received: from moniforce.com (213-84-208-64.adsl.xs4all.nl [213.84.208.64]) by smtpzilla1.xs4all.nl (8.12.9/8.12.9) with ESMTP id h98ABavY054707 for ; Wed, 8 Oct 2003 12:11:36 +0200 (CEST) Message-ID: <3F83E2A7.8070209@moniforce.com> Date: Wed, 08 Oct 2003 12:10:47 +0200 From: Peter Bozarov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20021005 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Recovery from mbuf cluster exhaustion X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2003 10:11:40 -0000 Hi, all, (First off, I hope I'm posting to the right list.) I have the following question regarding mbuf cluster exhaustion. If I've managed to exhaust the pool, I start getting the usual "All mbuf clusters exhausted, please see tuning(7)." message. Now, at that point this is what my mbuf pool looked like: [grid] ~ $ netstat -m 4305/4944/18240 mbufs in use (current/peak/max): 4305 mbufs allocated to data 4560/4560/4560 mbuf clusters in use (current/peak/max) 10356 Kbytes allocated to network (75% of mb_map in use) 8832 requests for memory denied 1 requests for memory delayed 0 calls to protocol drain routines [grid] ~ $ Now, the problem is not in the fact that this occurs, and tuning the kernel parameters is not what I'm interested in, since I don't need a larger pool. What I can't seem to figure out is how to flush out the "stale" mbufs/clusters. I can close down all network interfaces, and kill/restart most of the processes that I presume use up the mbufs. At a given point, there can't possibly be any processes that are hogging the mbuf clusters. Yet, a while later, this is what the pool looks like [grid] ~ $ netstat -m 4305/4944/18240 mbufs in use (current/peak/max): 4305 mbufs allocated to data 4304/4560/4560 mbuf clusters in use (current/peak/max) 10356 Kbytes allocated to network (75% of mb_map in use) 8832 requests for memory denied 1 requests for memory delayed 0 calls to protocol drain routines [grid] ~ $ A few clusters have been freed. But not much. Now, if (presumably) no clusters are being used by a process, should they not be released by the kernel? Alternatively, how can I enforce this (short of rebooting the machine, which is *not* the solution I'm looking for)? Thanks a lot for any input! Peter