From owner-freebsd-net@FreeBSD.ORG Fri Jan 24 03:18:03 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A11C629 for ; Fri, 24 Jan 2014 03:18:03 +0000 (UTC) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 4F1E61CA7 for ; Fri, 24 Jan 2014 03:18:03 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: X-IronPort-AV: E=Sophos;i="4.95,710,1384318800"; d="scan'208";a="90628593" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 23 Jan 2014 22:18:02 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 13609B4037; Thu, 23 Jan 2014 22:18:02 -0500 (EST) Date: Thu, 23 Jan 2014 22:18:02 -0500 (EST) From: Rick Macklem To: J David Message-ID: <58591523.15519962.1390533482068.JavaMail.root@uoguelph.ca> In-Reply-To: Subject: Re: Terrible NFS performance under 9.2-RELEASE? 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 7.2.1_GA_2790 (ZimbraWebClient - FF3.0 (Win)/7.2.1_GA_2790) Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jan 2014 03:18:03 -0000 J David wrote: > Rick, > > If iozone wants to do a 4kiB write in the middle of a 1GiB file and > the rsize/wsize are both set to 32kiB, does NFS read a 32k block over > the wire, modify it, and send it back? Or does it just send "write > this 4k at offset X" and let the server sort it out? > This depends on the client. For FreeBSD, if the rest of the 32K block has not been modified recently, it will mark that 4K byte range as dirty (b_dirtyoff, b_dirtyend in "struct buf") and it will do a 4Kbyte write at the correct offset. For Linux, I don't know. (Take a look at a wireshark trace of it and find out. You could write a simple program that does this once, so that the packet trace is short. Sorry, I couldn't resist;-) An NFS server must always be able to handle a write of any length starting at any byte offset. The performance effects on the server are largely defined by the type of exported file system on the server. I didn't mention this before, but using UFS will give you more realistic results than using mfs, since mfs would never be used for a real NFS server and never gets tested as an exported NFS file system. rick > Some of the tests I'm running are producing very strange results, and > I'm trying to understand what might be happening. > > 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" >