From owner-freebsd-stable@FreeBSD.ORG Tue Aug 31 01:59:39 2010 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 EAD4C10656AC for ; Tue, 31 Aug 2010 01:59:39 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id AC3788FC13 for ; Tue, 31 Aug 2010 01:59:39 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAFf+e0yDaFvO/2dsb2JhbACDFp5ErVWRfoEigyJzBIoJ X-IronPort-AV: E=Sophos;i="4.56,295,1280721600"; d="scan'208";a="90227861" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 30 Aug 2010 21:59:38 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 93BD8B3F25; Mon, 30 Aug 2010 21:59:38 -0400 (EDT) Date: Mon, 30 Aug 2010 21:59:38 -0400 (EDT) From: Rick Macklem To: rick-freebsd2009@kiwi-computer.com Message-ID: <378785023.301734.1283219978549.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20100830172259.GA20421@rix.kiwi-computer.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [24.65.230.102] X-Mailer: Zimbra 6.0.7_GA_2476.RHEL4 (ZimbraWebClient - SAF3 (Mac)/6.0.7_GA_2473.RHEL4_64) Cc: freebsd-stable@freebsd.org Subject: Re: Why is NFSv4 so slow? 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: Tue, 31 Aug 2010 01:59:40 -0000 > > Well I wouldn't say "well". Every client I've set up has had this > issue, > and somehow through tweaking various settings and restarting nfs a > bunch of > times, I've been able to make it tolerable for most clients. Only one > client is behaving well, and that happens to be the only machine I > haven't > rebooted since I enabled NFSv4. Other clients are seeing 2-3 MiB/s on > my > dd(1) test. > All I can tell you is that, for my old hardware (100Mbps networking) I see 10Mbytes/sec (all you can hope for) using the regular NFSv3 client. I see about 10% slower for NFSv3 and NFSv4 using the experimental client (NFSv3 and NFSv4 about identical). The 10% doesn't surprise me, since the experimental client is based on a FreeBSD6 client and, although I plan on carrying all the newer client changes over to it, I haven't gotten around to doing that. If it is still 10% slower after the changes are carried over, I will be looking at why. I don't tune anything with sysctl, I just use what I get from an install from CD onto i386 hardware. (I don't even bother to increase kern.ipc.maxsockbuf although I suggest that in the mount message.) I also do not specify any mount options other than the protocol version. My mount commands look like: # mount -t nfs -o nfsv3 :/path /mnt # mount -t newnfs -o nfsv3 :/path /mnt So, I don't see dramatically slower NFSv4 and expect to get the 10% perf. reduction fixed when I bring the exp. client in line with the current one, but can't be sure. So, I have no idea what you are seeing. It might be an issue that will be fixed when I bring the exp. client up to date, but I have no idea if that's the case? (It will be a few months before the client update happens.) The only thing I can suggest is trying: # mount -t newnfs -o nfsv3 :/path /mnt and seeing if that performs like the regukar NFSv3 or has the perf. issue you see for NFSv4? If this does have the perf. issue, then the exp. client is most likely the cause and may get better in a few months when I bring it up-to-date. rick