From owner-freebsd-net@FreeBSD.ORG Sat May 20 12:26:39 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94EB916A424 for ; Sat, 20 May 2006 12:26:39 +0000 (UTC) (envelope-from pblok@bsd4all.org) Received: from altrade.nijmegen.internl.net (altrade.nijmegen.internl.net [217.149.192.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7B3A43D46 for ; Sat, 20 May 2006 12:26:38 +0000 (GMT) (envelope-from pblok@bsd4all.org) Received: from mail.bsd4all.org by altrade.nijmegen.internl.net via 113-9.bbned.dsl.internl.net [82.215.9.113] with ESMTP id k4KCQZfm019532 (8.13.2/2.04); Sat, 20 May 2006 14:26:36 +0200 (MET DST) Received: from localhost (localhost.homebrew.bsd4all.org [127.0.0.1]) by mail.bsd4all.org (Postfix) with ESMTP id 49C545CF7; Sat, 20 May 2006 14:26:35 +0200 (CEST) X-Virus-Scanned: amavisd-new at bsd4all.org Received: from mail.bsd4all.org ([127.0.0.1]) by localhost (fwgw.homebrew.bsd4all.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id WYx6ctWWrskF; Sat, 20 May 2006 14:26:29 +0200 (CEST) Received: from ntpc (ntpc [192.168.1.138]) by mail.bsd4all.org (Postfix) with ESMTP id 446BC5CB6; Sat, 20 May 2006 14:26:29 +0200 (CEST) From: "Peter Blok" To: "'OxY'" , Date: Sat, 20 May 2006 14:22:22 +0200 Message-ID: <001a01c67c08$0b96c290$8a01a8c0@ntpc> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <000801c67c06$973a34a0$0201a8c0@oxy> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Thread-Index: AcZ8BtkQA8BXAOl/S96MzAIpaxzD4QAAO3ww Cc: Subject: RE: mbuf denied problem X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2006 12:26:39 -0000 Well, I'm not sure the developer's have seen it due to the fact that I was not able to post to the list somehow. And on the other hand I could have opened up a PR as well. Peter -----Original Message----- From: owner-freebsd-net@freebsd.org [mailto:owner-freebsd-net@freebsd.org] On Behalf Of OxY Sent: Saturday, May 20, 2006 2:12 PM To: Peter Blok; freebsd-net@freebsd.org Subject: Re: mbuf denied problem ----- Original Message ----- From: "Peter Blok" To: "'OxY'" ; Cc: "'Jin Guojun [VFFS]'" Sent: Saturday, May 20, 2006 1:50 PM Subject: RE: mbuf denied problem > Hi, > > I have posted a reply to similar questions a couple of times. Although I'm > subscribed to freebsd-net I never saw the answer appear in the list. > > The ... denied counts is coming from calling uma_reclaim, which will in > the > end call uma_zfree_internal which is increasing the fail counter. > > I am not sure, but I believe the mbuf and cluster zones are static. So if > I > set the UMA_ZONE_NOFREE flag in kern_mbuf.c, no attempt will be made to do > a > free at all. > > Here's my patch. It works, but I'm not sure it is ok. > > --- sys/kern/kern_mbuf.c.orig Sun Apr 9 13:32:51 2006 > +++ sys/kern/kern_mbuf.c Sun Apr 9 13:33:19 2006 > @@ -168,7 +168,7 @@ > #else > NULL, NULL, > #endif > - MSIZE - 1, UMA_ZONE_MAXBUCKET); > + MSIZE - 1, UMA_ZONE_MAXBUCKET|UMA_ZONE_NOFREE); > > zone_clust = uma_zcreate(MBUF_CLUSTER_MEM_NAME, MCLBYTES, > mb_ctor_clust, mb_dtor_clust, > @@ -177,7 +177,7 @@ > #else > NULL, NULL, > #endif > - UMA_ALIGN_PTR, UMA_ZONE_REFCNT); > + UMA_ALIGN_PTR, UMA_ZONE_REFCNT|UMA_ZONE_NOFREE); > > if (nmbclusters > 0) > uma_zone_set_max(zone_clust, nmbclusters); > thank you, i'll try it in a couple of days! it's sad that it's a returning question and no patch from the developers. > -----Original Message----- > From: owner-freebsd-net@freebsd.org [mailto:owner-freebsd-net@freebsd.org] > On Behalf Of OxY > Sent: Friday, May 19, 2006 12:06 AM > To: freebsd-net@freebsd.org > Cc: Jin Guojun [VFFS] > Subject: mbuf denied problem > > hi! > > i have a problem with mbuf... > when all my free memory is gone ( i have 2gb ram) and > memory allocation looks like this: > > Mem: 30M Active, 1607M Inact, 245M Wired, 84M Cache, 214M Buf, 3028K Free > Swap: 695M Total, 695M Free > > mbuf starts to deny... > netstat -m show 0 deny till has memory, after that i see this: > > Field root# netstat -m > 629/466/1095 mbufs in use (current/cache/total) > 512/176/688/65536 mbuf clusters in use (current/cache/total/max) > 512/133 mbuf+clusters out of packet secondary zone in use (current/cache) > 0/0/0/0 4k (page size) jumbo clusters in use (current/cache/total/max) > 0/0/0/0 9k jumbo clusters in use (current/cache/total/max) > 0/0/0/0 16k jumbo clusters in use (current/cache/total/max) > 1181K/468K/1649K bytes allocated to network (current/cache/total) > 7410219/101093/101499 requests for mbufs denied > (mbufs/clusters/mbuf+clusters) > 0/0/0 requests for jumbo clusters denied (4k/9k/16k) > 0/0/0 sfbufs in use (current/peak/max) > 0 requests for sfbufs denied > 0 requests for sfbufs delayed > 25288 requests for I/O initiated by sendfile > 65 calls to protocol drain routines > > this is my sysctl.conf: > net.inet.tcp.delayed_ack=0 > net.inet.ip.intr_queue_maxlen=400 > net.inet.tcp.inflight.enable=0 > net.route.netisr_maxqlen=512 > kern.ipc.somaxconn=1024 > > should i attach any other conf/log,etc? > thanks! > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"