PDA

View Full Version : NFS (version 3) performance/hanging


paul_one
24th January 2009, 05:53 PM
OK guys,

I've always found NFS problems occurring in Fedora - I don't know why exactly.
This last one has me stumped though:

Two computers:
Sophie (server) : 192.168.0.5
Toni (client) : 192.168.0.10

Fedora 10 server, serving out a directory with the following /etc/exports entry:
/server -rw,no_root_squash,no_subtree_check,sync 192.168.0.3 192.168.0.10

Fedora 9 client (am going to upgrade very soon..fingers crossed!!), mounting with:
mount 192.168.0.5:/server /mnt

One factor to this is that it's over a wireless network.
YES, I hear you crying out, but I'd rather be able to sync my laptop up over wireless without having to plug it in all the time - so yes, I am willing to have a slightl performance hit.
**BUT**

I rsync a file:
rsync --stats -v --progress ./350MB.file /mnt/media/
It gets to 35-ish megs and hangs.
All other NFS communication hangs too, until I unmount /mnt.

I inititally though this could be down to missing packets, so I reduced the speed on both interfaces down to 18 megs, and tested with:
ping -f 192.168.0.1 and
ping -f 192.168.0.x where x is the other server.
... Both produce less then 1% missing packets over several minutes.

This is where it goes odd: after starting the rsync, and testing the ping -f again, I get A LOT of dropped packets.

I attempt to do a wireshark capture, and there's LOADS of NFS activity (and A LOT of "tcp out-of-order" packets flying about).

I attempt to change the protocol to udp, and get the same problems (except no out-of-order packets).

I remount and instead try to GET a large file and get a read speed of about 100K/s.
... This is APPALLING!!

So I try and do an scp between the two computers... 400-500 K/s.
... Wait a minute.. An ENCRYPTED copy get's roughly 500K a second from computer to computer - but NFS, using the sync (or async) option, can't get more then 100 and hangs in the other direction?

dmesg shows no output and neither does the messages file.

I've tried nfsstat and nfswatch but both just look very messy to me.

Can anyone help me figure out what is wrong with this?
I'm currently going to attempt an eth-to-eth connection to see what performance that gets.

sej7278
24th January 2009, 09:37 PM
nfs is sh1t on fedora 9/10 and centos 5 for some reason, even with my gigabit lan i get no more than about 40mbps using async mode, and nautilus hangs for seconds at a time (windows go grey).

macosx funnily enough seems to cope much better and i think faster!

but really wireless, especially encrypted just can't handle large file transfers, it should be limited to web surfing.

as far as rsync goes, i have seen it hang when using ssh transport mode as you are there (especially if you enable jumbo frames). if you use rsync daemon mode using the "rsync rsync://192.168.1.2/...." command, then it should work better and faster.