[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: nfs is very slow

* Gregor Stößer (stoesser@chemie.uka.de) [030808 00:37]:
> On Thu, Aug 07, 2003 at 05:39:55PM +0200, Nicos Gollan wrote:
> > On Thursday 07 August 2003 14:01, Gregor Stößer wrote:
> > > I'm having some trouble with my nfs-server. Performance is very bad, but
> > > all ather protocols (ftp, http, scp) are quite fast.
> > 
> > ftp, http et al. use TCP connections while NFS per default uses UDP packets. 
> > More recent kernels have experimental support for NFS over TCP. In your case 
> > (fast network where latency is a very limiting factor), there might be a 
> > problem with NFS sending small packages and needing confirmation on every 
> > one, thus adding a huge overhead, while TCP scales better. If you find a way 
> > to increase packet sizes - gigabit ethernet should support around 65kB -, you 
> > might actually see a performance increase.
> I'm using already read- and write sizes of 64kB, that's not the point.
> But NFS over TCP might be worth trying. Nevertheless, my machine worked
> without any problem for more than a year, so changing from UDP to TCP
> might help, but there must be some other reason.

It's worth a try.  Using large rsize and wsize (like you're doing) can
help, to a certain extent, but it can also hurt, if your network drops
any packets at all.  When NFS asks to send a 64kb packet, it is actually
sent as a bunch of fragments.  If but one of those fragments is lost,
the whole thing is lost. UDP provides no reliability.  When NFS reaches
its timeout and realizes that the packet never arrived, the whole thing
needs to be sent again.  TCP improves on the situation greatly since one
lost packet means just that one packet gets retransmitted, not the whole
64kb again.  You could also try sticking with UDP and _lowering_ rsize
and wsize to 8k or even less, to reduce the number of failed

good times,
int main() {
    puts("Reader! Think not that \n"
         "technical information \n"
         "ought not be called speech;");
    return 0;

Attachment: signature.asc
Description: Digital signature

Reply to: