Why is NFSv4 so slow?

Rick Macklem rmacklem at uoguelph.ca
Wed Sep 1 15:46:32 UTC 2010


> Hi everyone,
> 
> I am experiencing similar issues with newnfs:
> 
> 1) I have two clients that each get around 0.5MiB/s to 2.6MiB/s
> reading
> from the NFS4-share on Gbit-Lan
> 
> 2) Mounting with -t newnfs -o nfsv3 results in no performance gain
> whatsoever.
> 
> 3) Mounting with -t nfs results in 58MiB/s ! (Netcat has similar
> performance) → not a hardware/driver issue from my pov
> 

The experimental client does reads in larger MAXBSIZE chunks,
which did cause a similar problem in Mac OS X until
rsize=32768,wsize=32768 was specified. Rick already tried that,
but you might want to try it for your case.

> Is there anything I can do to help fix this?
> 
Ok, so it does sound like an issue in the experimental client and
not NFSv4. For the most part, the read code is the same as
the regular client, but it hasn't been brought up-to-date
with recent changes.

One thing you could try is building a kernel without SMP enabled
and see if that helps? (I only have single core hardware, so I won't
see any SMP races.) If that helps, I can compare the regular vs
experimental client for smp locking in the read stuff.

rick



More information about the freebsd-stable mailing list