Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!decwrl!bacchus.pa.dec.com!mogul From: mogul@wrl.dec.com (Jeffrey Mogul) Newsgroups: comp.protocols.nfs Subject: Re: NFS writes and fsync(). Message-ID: <1990Oct16.004225.22754@wrl.dec.com> Date: 16 Oct 90 00:42:25 GMT References: <1990Oct9.152612@objy.objy.com> Sender: news@wrl.dec.com (News) Organization: DEC Western Research Lines: 36 This seems like a good time to insert a few comments into the NFS synchrony debate (especially since I'm going away for a week). One of the problems with NFS is that it manages to tangle up several different issues, which makes it hard to solve one without breaking something else. For example, the reason why NFS clients do write-throughs to the server is partly for reliability (the client could crash before a delayed write is sent to the server) and partly a consquence of the statelessness dogma. This is because if you have two clients sharing the same file, changes have to appear on the server "as soon as possible" in order to preserve some shreds of local-Unix-like cache consistency. If NFS clients behaved like local-disk Unix systems (only write dirty blocks every 30 seconds), then it wouldn't matter as much if the server acknowledged them immediately, or waited until the data was safely on the disk. (As has been pointed out, it would be a trivial change to allow the client to distinguish "precious" blocks from others, just as the local-disk Unix file system has always done.) But, since server disk write latency is so nakedly exposed to client applications, anything that speeds that latency (such as a "stable-storage" cache, or faster disks) helps a lot. Of course, NFS isn't the last word in file systems. Anyone interested in a better design can read the papers on Sprite (e.g., Michael N. Nelson, Brent B. Welch, and John K. Ousterhout, "Caching in the Sprite Network File System", Trans. Computer Systems 6:1, pages 134-154, Feb. 1988) and Spritely NFS (V. Srinivasan and Jeffrey C. Mogul, "Spritely NFS: Experiments with Cache-Consistency Protocols", Proc. 12th SOSP, pages 45-57, Dec. 1988). But for many of us (including me!), NFS is what we use, so solutions that don't require protocol changes (such as server stable-storage boards) might still be a win. -Jeff