From owner-freebsd-stable@FreeBSD.ORG Mon Feb 21 23:10:51 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAC8F10656C8 for ; Mon, 21 Feb 2011 23:10:51 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 725B08FC25 for ; Mon, 21 Feb 2011 23:10:51 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvEAANN/Yk2DaFvO/2dsb2JhbACEH5NXDo8wqlGQaIEngVaBa3YEhQ2HBoZL X-IronPort-AV: E=Sophos;i="4.62,202,1297054800"; d="scan'208";a="111699214" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 21 Feb 2011 18:10:50 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 7B044B3F32; Mon, 21 Feb 2011 18:10:50 -0500 (EST) Date: Mon, 21 Feb 2011 18:10:50 -0500 (EST) From: Rick Macklem To: Kirill Yelizarov Message-ID: <1257594558.173363.1298329850374.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <850225.44477.qm@web120517.mail.ne1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE8 (Win)/6.0.10_GA_2692) Cc: freebsd-stable@freebsd.org Subject: Re: NFS client over udp X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Feb 2011 23:10:51 -0000 > --- On Sun, 2/20/11, Rick Macklem wrote: > > > From: Rick Macklem > > Subject: Re: NFS client over udp > > To: "Kirill Yelizarov" > > Cc: freebsd-stable@freebsd.org > > Date: Sunday, February 20, 2011, 9:02 PM > > > --- On Fri, 2/18/11, Kirill > > Yelizarov > > > > > On Fri, Feb 18, 2011 at 05:27:00AM > > > > > -0800, Kirill Yelizarov wrote: > > > > > > I have a reproducible memory leak when > > using nfs > > > > > client with an old > > > > > > nfs server > > > > > > and mbufs used > > > 8193/1722/9915 mbufs in use (current/cache/total) > > > 8192/1264/9456/25600 mbuf clusters in use > > (current/cache/total/max) > > > 8192/605 mbuf+clusters out of packet secondary zone in > > use > > > (current/cache) > > > 0/768/768/12800 4k (page size) jumbo clusters in use > > > (current/cache/total/max) > > > 0/0/0/6400 9k jumbo clusters in use > > (current/cache/total/max) > > > 0/0/0/3200 16k jumbo clusters in use > > (current/cache/total/max) > > > 18432K/6030K/24462K bytes allocated to network > > (current/cache/total) > > > 0/0/0 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 > > > 0 requests for I/O initiated by sendfile > > > 0 calls to protocol drain routines > > > > > > Kirill > > > > > You could try the attached patch. It fixes the only places > > in the > > client side krpc over udp that seems mights cause a leak. I > > have no > > idea if it will help, since these cases should rarely, if > > ever, > > happen in practice. > > > > Please let us know if you have the chance to try the patch > > and > > whether or not it helped. > > > > rick > > > Rick, i tried your patch. Fortunately it didn't help me. There are no > warnings on console and memory is climbing up during syncs and not > freed later. I'll try to switch to tcp this evening. Thanks for help > I'll assume that's unfortunately;-) Since the two cases patched probably never happen, I'm not surprised. The only other thing I can think of that you could try is switching to the experimental client. This would identify if the bug is in the regular client or somewhere further down in the rpc transport. The mount command would look something like: # mount -t newnfs -o nfsv3,udp : Thanks for trying it and letting me know, rick