Subject: Re: NFS transport
To: None <tech-kern@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 07/24/2002 02:17:40
> ... not that the Penguin-OS is on topic, but in the days of Linux'
> userland NFS server, UDP was probably better: it's cheaper to do IP
> reassembly and pay the copyout/contexsw cost only once per RPC,
> rather than once per TCP segment.
If you do a copyout and context switch on every segment, instead of
just when PSH is set or a buffer is full, you're obviously (FSVO
"obviously") not concerned about that sort of performance issue anyway.
And if the RPC code is causing a PSH for every segment instead of just
at the end of the "packet", you've got broken RPC code (or perhaps a
broken API underneath it that doesn't let the RPC code _not_ PSH).
[And someone else writes, in another message]
> Never mind the OS features, on a local LAN segment with network card
> that have adequate buffering packets just don't get lost.
And we all know nobody ever does NFS mounts over anything but local LAN
segments with nonbroken network interfaces with "adequate" buffering
(whatever "adequate" means).
</deadpan>
> I remember some tests done with large TCP (IIRC) windows. The
> recipient decides to ack every other packet, however the sender has a
> 32k window - so is sending about 22 full sized packets out back to
> back.
Unless you've specifically disabled slow start in these tests, this is
rather severely broken. (Or you're using a stack without slow start,
which I would hope never goes near the general Internet.)
Aside from that, though, yes, if you're lucky enough to be on a fast
and highly reliable network, you may be measurably better off with UDP
than TCP, because as you point out it has less overhead.
However-- just how much _does_ all that extra overhead reduce
throughput? My seat-of-the-pants guess is that it's less than ten
percent, down in the range where if that little extra bit of
performance matters to you, you're probably dedicated enough that you
don't mind having to seek out the right options to get the best
performance (like using UDP instead of TCP).
And TCP will certainly help over even slightly lossy networks, for all
the reasons already mentioned.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B