SUMMARY: NFS Behaviour on Writes

From: Jochen Bern (bern@kleopatra.Uni-Trier.DE)
Date: Mon Jan 10 1994 - 17:20:19 CST

Hello fellow Managers,

about a Week ago I asked:

> we finally have received our UPS. What I'ld like to ask you is
> the following: Our Intent is to protect the Files on our Fileserver from
> being damaged when there's a Power Outage. However, we can't hang all the
> NFS Clients onto UPS (too many, too distributed, too much Electricity con-
> sumpted). Thus, I'ld like to force the Clients to have all *write* Opera-
> tions sent to the Fileserver immediately, where they'll be "safe". I could
> imagine that this is the standard Behaviour (to avoid concurrent-Writer
> Problem in the Cluster), but I'ld like to know for sure.

It turned out that there are several Viewpoints to this Problem, which I
call Granularity and Speed, for Lack of better Terms.

Most Respondees addressed Granularity, basically saying "your NFS Client
will be blocked when he writes via NFS until the Changes made it to the
Disk" (!, not to the Server's Buffers, TO THE DISK!). This is an important
Thing, it means that no Matter what the Client does, you'll always have
a fsck-clean Filesystem. (OTOH, if the Client chose to overwrite a File
directly and is powered down midway, you'll end up with a garbled File.
No Cure to this.)

The other Point is Speed. Since the Server is on UPS, I wanted all Writes
to go to it ASAP, i.e. inhibit Write Buffers on the Client Side. This
turned out to be a very complicated Thing to do:

1) If the Client does run biod's, they will manage both Read-aheads and
   Write-behinds. One Possibility is to turn them off --- actually giving
   up Read-ahead Capabilities and opening the Way for small (down to
   single Bytes) NFS Packets. Another Possibility is to give rsize, wsize
   and timeo Options to the mount Command / fstab Entry; The standard
   Values are 8k Read-ahead, 8k Write-behind and 1.1 Seconds.

2) Some People stated that there is ANOTHER 8k Buffer Mechanism for NFS,
   or possibly the Mount Options mentioned above even belong to this

3) Hal Stern from SUN even stated that there is another *non-NFS-specific*
   Buffer Mechanism *atop* NFS, the Virtual Memory System (VM). If so,
   tweaking NFS Behaviour below would be pretty much useless since NFS
   would receive VM Blocks only. Note the Contradiction to "down to single
   Bytes" above ...

To summarize this Summary, it would probably be a Lot of Work for a small

Thanks to:
Eckhard Rueggeberg <>
Mike Raffety <>
Birger A. Wathne <>
Sten Gunterberg <sten@ergon.CH>
Barry Margolin <barmar@Think.COM>
Glenn Satchell <>
james mularadelis <>
Hal Stern <stern@sunrise.East.Sun.COM>

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:54 CDT