Subject: Re: NFS...pilot error?
To: None <netbsd-help@netbsd.org>
From: David Laight <David.Laight@btinternet.com>
List: netbsd-help
Date: 12/10/2001 09:49:10
> I've set up an NFS mount for sharing a subdirectory.  For the sake of
> concreteness, the situation is:
> 
>  hermes (tower with lots of disk space); exports /usr/nfs-export via NFS.
> 
>  odysseus (laptop); mounts hermes:/usr/nfs-export onto /hermes.
> 
snip...
> 
> The problems tend to be associated with buffer overruns.  (These do not
> seem to be inherently fatal; I can get lots of overruns in moving files
> with scp, without real mishap.)  I assume that I can sort out the
> immediate problem by adjusting my LAN's MTU (as a quick fix to the MSS/MTU
> problems on PPPoE, I set my MTU low rather than the route MTU over the
> default route).

The 'problem' is that NFS will be sending 8k UDP datagrams, fragmented
into multiple packets by IP.
If your client cannot successfully receive these blocks of frames then the
NFS connection cannot work.  What is more dropped fragments probably
leave IP with buffers full of partially re-asssembled datgrams, leading
to a possible buffer crisis.
The NFS retries will just pile on the agony.
> 
> However...this seems like a serious problem, and it seems to me that
> something as heavily used as NFS should (if itself properly configured)
> not suffer such serious side effects from something as minor as an MTU
> problem.  (Especially since scp, etc., can cope quite well.)

The other connections will be TCP and rely on TCP retransmitting the lost
packets - which it will do wuth just occaisional (bad) hiccups.
> 
> Am I right?  Do I necessarily have a poorly configured NFS?  Or is NFS
> just very touchy about being in an _environment_ that's properly
> configured?

You are (probably) not suffering from bad configuration, just a network
card that doesn't have enough buffer space (I guess it is pcmcia card).
Note that if you mounted the filesystems the other way around things
could be much worse!  Some (at least) NFS clients will do multiple,
concurrent, writes when flushing out local cache - the receiving NIC
needs to be receive a considerable number of backto back packets for
this to work.

One possibility is to specify a smaller message size to NFS.  But I dunno
if netBSD lets you do it!
> 
> 
>   ``I probably don't know what I'm talking about.'' --rauch@math.rice.edu
> 
Neither do I - but it's convincing sometimes...

    David