From owner-freebsd-questions Thu Jun 17 18:47:59 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cygnus.rush.net (cygnus.rush.net [209.45.245.133]) by hub.freebsd.org (Postfix) with ESMTP id 6CBB61555A for ; Thu, 17 Jun 1999 18:47:54 -0700 (PDT) (envelope-from bright@rush.net) Received: from localhost (bright@localhost) by cygnus.rush.net (8.9.3/8.9.3) with SMTP id VAA20924; Thu, 17 Jun 1999 21:48:06 -0400 (EDT) Date: Thu, 17 Jun 1999 20:48:05 -0500 (EST) From: Alfred Perlstein To: Studded Cc: freebsd-questions@FreeBSD.ORG Subject: Re: What *exactly* does nfsiod do? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 17 Jun 1999, Studded wrote: > I'm trying to debug some NFS issues with amd and I'm trying to > figure out if nfsiod is helping me or hurting me. The man page says, > > Nfsiod runs on an NFS client machine to service asynchronous I/O > requests to its server. It improves performance but is not > required for correct operation. > > My confusion is about the meaning of "its server" in that sentence. If my > machine is an NFS client only (i.e., it's using amd to automount > directories on remote machines via NFS) does nfsiod come into play at all? yes, "its server" refers to the machine that it's using files over NFS. > And if not, when would it come into play, and which server is the man page > referring to there? With the interest you've taken in FreeBSD it's prolly time to pick up "Design and Implementation of the 4.4 BSD Operating System" It'll answer a lot of your questions without scaring the newbies. :) Anyhow, since NFS is an ugly and mean thing and wouldn't be fast unless gross hacks were made to make it fast, let me explain where nfsiod comes into play: if you are running nfsiods then: A process goes to do an NFS write, the kernel immediately returns with an ok, but queues the write for the nfsiods to pick up. nfsiods are completely kernel resident (except when doing kerberos stuff), they enter the kernel and wait for a process to require something that can be done asyncronously, when the process does that they (nfsiod) are woken up to work on this queued request and the process immediately returns. the nfsiod then performs the operation(s). problems that nfsiod causes are basically that error are now asyncronous, unless accompanied by fsync() calls on the file handle. normally you might not expect a write() call to succeed when the disk is full, however you can have this happen when you are running nfsiod, an async error that may only get reported to you when you perform a close() on the file. of course, proper program checkpoint themselves and fsync(), however, proper programs account for about .01% of the software out there today. in so far as bugs, using nfsiod may find some that non-nfsiod machines find and vice-versa. using nfsiod is recommended for performance reasons. excuse the rambling, but perhaps helpful? -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message