Why is NFSv4 so slow?

Rick Macklem rmacklem at uoguelph.ca
Mon Sep 13 15:15:36 UTC 2010


> 
> Ok ...
> 
> NFS server:
> - FreeBSD 8.1-PRERELEASE-20100620 i386
> - intel Atom 330 (1.6 GHz dual-core with HT --> 4-way SMP)
> - 4 GB RAM
> - re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet>
> 
> NFS client:
> - FreeBSD 8.1-STABLE-20100908 i386
> - AMD Phenom II X6 1055T (2.8 GHz + "Turbo Core", six-core)
> - 4 GB RAM
> - re0: <RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet>
> 
> The machines are connected through a Netgear GS108T
> gigabit ethernet switch.
> 
> I umounted and re-mounted the NFS path after every single
> dd(1) command, so the data actually comes from the server
> instead of from the local cache. I also made sure that
> the file was in the cache on the server, so the server's
> disk speed is irrelevant.
> 
> Testing with "mount -t nfs":
> 
> 183649990 bytes transferred in 2.596677 secs (70725002 bytes/sec)
> 183649990 bytes transferred in 2.578746 secs (71216779 bytes/sec)
> 183649990 bytes transferred in 2.561857 secs (71686277 bytes/sec)
> 183649990 bytes transferred in 2.629028 secs (69854708 bytes/sec)
> 183649990 bytes transferred in 2.535422 secs (72433702 bytes/sec)
> 
> Testing with "mount -t newnfs":
> 
> 183649990 bytes transferred in 5.361544 secs (34253192 bytes/sec)
> 183649990 bytes transferred in 5.401471 secs (33999996 bytes/sec)
> 183649990 bytes transferred in 5.052138 secs (36350946 bytes/sec)
> 183649990 bytes transferred in 5.311821 secs (34573829 bytes/sec)
> 183649990 bytes transferred in 5.537337 secs (33165760 bytes/sec)
> 
> So, nfs is roughly twice as fast as newnfs, indeed.
> 
> Best regards
> Oliver
> 
Thanks for doing the test. I think I can find out what causes the
factor of 2 someday. What is really weird is that some people see
several orders of magnitude slower (a few Mbytes/sec).

Your case was also useful, because you are using the same net
interface/driver as the original report of a few Mbytes/sec, so it
doesn't appear to be an re problem.

Have a good week, rick



More information about the freebsd-fs mailing list