From owner-freebsd-questions Fri Sep 6 8:10: 8 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA1F137B401 for ; Fri, 6 Sep 2002 08:09:58 -0700 (PDT) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE36543E3B for ; Fri, 6 Sep 2002 08:09:57 -0700 (PDT) (envelope-from keramida@ceid.upatras.gr) Received: from hades.hell.gr (patr530-a079.otenet.gr [212.205.215.79]) by mailsrv.otenet.gr (8.12.4/8.12.4) with ESMTP id g86F9o7j003010 for ; Fri, 6 Sep 2002 18:09:56 +0300 (EEST) Received: from hades.hell.gr (hades [127.0.0.1]) by hades.hell.gr (8.12.6/8.12.6) with ESMTP id g86ClnSh002895 for ; Fri, 6 Sep 2002 15:47:50 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from charon@localhost) by hades.hell.gr (8.12.6/8.12.6/Submit) id g86ClnNM002894; Fri, 6 Sep 2002 15:47:49 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 6 Sep 2002 15:47:49 +0300 From: Giorgos Keramidas To: Wahyu Hidayat Cc: freebsd-questions@FreeBSD.org Subject: Re: running out of mbuf Message-ID: <20020906124749.GD2168@hades.hell.gr> References: <20020905184835.P1069@seven.alameda.net> <20020906022036.90263.qmail@web40013.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020906022036.90263.qmail@web40013.mail.yahoo.com> X-PGP-Fingerprint: C1EB 0653 DB8B A557 3829 00F9 D60F 941A 3186 03B6 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [-- Removed freebsd-stable from the Cc: header. ------] [-- Please do not cross post to more than one list. --] On 2002-09-05 19:20 +0000, Wahyu Hidayat wrote: > Thanks for all your immediate reply. > > Sure I have raised NMBCLUSTERS (in my netstat shows to > 20480). > > What is the explanation for my previous post about max > mbufs has not reached, but it already shows about mbuf > allocation failed ? What if I increase nmbclusters but > this problems still occurs ? Mbufs are internal kernel structures used for buffering network data. When an mbuf needs to hold a lot of data, an `mbuf cluster' is attached to it as extra space. You have a lot of free mbufs to use, but your clusters are running out. This way when someone requests that an mbuf is allocated to hold a large amount of data the allocation that has two stages (first allocate an mbuf, then a cluster to attach to it) fails during the second stage--the mbuf cluster allocation. Looking at the netstat -m output you have posted: > 22070/22544/81920 mbufs in use (current/peak/max): > 20490 mbufs allocated to data > 1580 mbufs allocated to packet headers > 20462/20480/20480 mbuf clusters in use (current/peak/max) > 46596 Kbytes allocated to network (7% of mb_map in use) > 87932 requests for memory denied > 274 requests for memory delayed > 0 calls to protocol drain routines you can easily see that the peak use of mbuf clusters is 100%. When all of your mbuf clusters have been used, an allocation that will request more clusters will fail. This is what happens, when you are getting those messages. - Giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message