Date: Sun, 20 Aug 1995 12:02:14 -0600 From: Nate Williams <nate@rocky.sri.MT.net> To: steve@simon.chi.il.us (Steven E. Piette) Cc: terry@cs.weber.edu, freebsd-hackers@freebsd.org Subject: Re: Making a FreeBSD NFS server Message-ID: <199508201802.MAA21666@rocky.sri.MT.net> In-Reply-To: <m0skEFY-0006IJC@simon.chi.il.us> References: <m0skEFY-0006IJC@simon.chi.il.us>
next in thread | previous in thread | raw e-mail | index | archive | help
Steven E. Piette writes: [ Speeding up NFS writes ] Terry > You can turn on async writes in the BSD NFS server. Terry> Be warned that, though Sun and SVR4 do this too, this is a cache Terry> coherency violation and can result in Bad Things Happening in case Terry> of a server power failure or other failure that results in the Terry> server going down, then coming back up while the app on a client Terry> is still running. This is because the client will think the data Terry> was written and may depend on being able to retrieve it later Terry> (ie: a database index). > Steve> Terry, Do you bother checking your references before you make blanket Steve> statements or do you like to just wing it? Do you bother checking them Steve> after someone points out your errors? Huh? What Terry said above is correct. With async writes, the server effectively tells the client is that the data has been written (when in fact it really hasn't been). In the case of a power failure that occurs after the server has informed the client, but *before* the data has actually been written you have big problems. The problems are even bigger IF the server reboots and comes back online and the client application is still running (it hung waitig on disk access or something). The client assumes the data is written since it doesn't have reason to assume otherwise, so it depends on that data being there, which it isn't. The problem can be avoided by hardware solutions such as 'PrestoServe', which is basically a hardware NFS-cache. In the event of a system failure, the data is kept in RAM until the machine reboots, at which point the data is flushed out to disk. With prestoserve, you get the advantage of ASYNC writes *and* data validity. This, of course relies on the fact that NFS traffic is 'bursty' and not continious or else you wouldn't be able to cache up all of the data coming in. What Terry described is something I've experienced when messing around with NFS and async. writes. Note, I was purposefully crashing the machine to see the results, but in the real power failures are something you need to worry about. However, if I had a good UPS on the NFS server box I'd go for async. writes though. :) Nate
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508201802.MAA21666>