bad NFS/UDP performance

Robert Watson rwatson at
Fri Oct 3 09:25:24 UTC 2008

On Fri, 3 Oct 2008, Danny Braniss wrote:

> gladly, but have no idea how to do LOCK_PROFILING, so some pointers would be 
> helpfull.

The LOCK_PROFILING(9) man page isn't a bad starting point -- I find that the 
defaults work fine most of the time, so just use them.  Turn the enable syscl 
on just before you begin a run, and turn it off immediately afterwards.  Make 
sure to reset between reruns (rebooting to a new kernel is fine too!).

> as a side note, many years ago I checked out NFS/TCP and it was really bad, 
> I even remember NetApp telling us to drop TCP, but now, things look rather 
> better. Wonder what caused it.

Well, the virtues of TCP become more apparent with higher network speeds, as 
the logic to fill pipes using TCP, manage flow control, etc, is a lot more 
sophisticated than what's in the RPC code for using UDP.  The downsides to UDP 
are also becoming more apparent: as network speeds go up, fragmented UDP risks 
IP ID collisions which could lead to data corruption, or at the very least, 
dropped packets.  We have changed the default for NFSv3 mounts to TCP in 8.x, 
and talked about doing it for 7.1; unfortunately the timing wasn't quite 
right, so it most likely will appear in 7.2.

Robert N M Watson
Computer Laboratory
University of Cambridge

More information about the freebsd-stable mailing list