Date: Mon, 14 Apr 2008 20:37:02 -0700 From: Alfred Perlstein <alfred@freebsd.org> To: Dan Nelson <dnelson@allantgroup.com> Cc: nawfal@googlemail.com, freebsd-stable@freebsd.org, Robert Blayzor <rblayzor.bulk@inoc.net> Subject: Re: NFS and /etc/exports Message-ID: <20080415033702.GY95731@elvis.mu.org> In-Reply-To: <20080415015928.GB59360@dan.emsphone.com> References: <1208170926.12349.20.camel@nawfal-desktop> <1886249E-54FF-4EFE-A7B9-C6AB2488EB4D@inoc.net> <20080414232851.GU95731@elvis.mu.org> <20080415015928.GB59360@dan.emsphone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* Dan Nelson <dnelson@allantgroup.com> [080414 20:24] wrote: > In the last episode (Apr 14), Alfred Perlstein said: > > * Robert Blayzor <rblayzor.bulk@inoc.net> [080414 06:07] wrote: > > > On Apr 14, 2008, at 7:02 AM, Nawfal bin Mohmad Rouyan wrote: > > > >I'm using TCP and the entry in /etc/fstab on all clients is as below: > > > > > > > >build:/usr/ports /usr/ports nfs tcp,intr,nfsv3,-w=32768,-r=32768,rw,noauto 0 0 > > > >build:/usr/src /usr/src nfs tcp,intr,nfsv3,-w=32768,-r=32768,rw,noauto 0 0 > > > >build:/usr/obj /usr/obj nfs tcp,intr,nfsv3,-w=32768,-r=32768,rw,noauto 0 0 > > > > > > Are -r and -w really needed/useful for TCP mounts? > > > > yes. > > This is interesting: according to mountnfs() in nfs_vfsops.c, those are > already the kernel defaults: > > if ((argp->flags & NFSMNT_NFSV3) && argp->sotype == SOCK_STREAM) { > nmp->nm_wsize = nmp->nm_rsize = NFS_MAXDATA; > } else { > nmp->nm_wsize = NFS_WSIZE; > nmp->nm_rsize = NFS_RSIZE; > } > > $ grep nfs_maxdata /sys/nfs/* > /sys/nfs/nfsproto.h:#define NFS_MAXDATA 32768 > > But it looks like /sbin/mount_nfs always overrides them to NFS_WSIZE > and NFS_RSIZE (both 8K) in its nfsdefargs struct. Yeah, not sure what to make of this. :) Using packet size greater than 8k for UDP mounts can really make your life miserable because a single dropped IP packet will force retransmit of the whole packet. In my experience when using TCP it's really good to go to 32k. -- - Alfred Perlstein
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080415033702.GY95731>