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

Re: NFS: Increase performance with option "tcp"



Hi,

On Mon, 29 Jän 2007, Petter Reinholdtsen wrote:

> [Ralf Gesellensetter] wrote:
> > on the German user list, there has been a thorough discussion about
> > performance optimization of NFS. Accordingly, udp (set by default)
> > connections are slow due repeated loss of data. Therefor it was
> > highly recommended to switch to TCP mode.
> 
> I have problems understanding this.  If there are a lot of IP packets
> lost, I fail to understand why it is better to leave the resending to
> the TCP stack instead of letting the NFS protocol take care of it.
> Can anyone explain it?

i wrote the german mail... here the setup which causes this problem.

server 1gbit link
switch 1gbit port
client 100mbit port


- client makes a request to the server
- server answers with a lot of packages
- the switches drops 90% of them
- it takes a looong time to recover from this packet loss, so performance is
  poor for small files

the only thing which solves such a szenario is switching to tcp and avoid
UDP protocols when dropping packages is harmful. (or always make enough load
to the server so he never has more than 100mbit per client)


the samething can also happen the other way around..

server 100mbit link
switch 1gibt link
client 1gibt link


.. the problem is the switch which by definition can only drop packages, an
ip router on the bridge between 100mbit/1gbit would solve the problem because
he can send ICMP flow control messages.


and .. of course there is ethernet flow control, which is really harmful in
this case..

server send a lot of packages
switch sends a ethernet pause frame
all other clients have to wait... because the server stops _all_
transmissions until the slowest client can catch up.


A friend of mine, Peter Palfrader hit this problem on his university and
debugged it. The only way to get good performance is to use TCP.
(if search on google there a lot of people which have this problem, poor NFS
performance on small files..)

Because nearly every new Server has a 1gbit Link, and nearly every Switch has
a 1gibt Link, i think it should be a default to use TCP..

This problem not only affects NFS it also is a problem for older Windows
Desktops 95/96/ME which use Netbios, which is also UDP based.

-- 
Florian Reitmeir



Reply to: