3

I'm connecting my raspberry pi (raspbmc) with my synology nas. I have 2 mounts

192.168.0.5:/volume1/video      /mnt/video      nfs     udp,intr,noatime,rsize=32768,wsize=32768,nolock,nfsvers=3,async 0 0
192.168.0.5:/volume1/video      /mnt/video2     nfs     tcp,intr,noatime,rsize=32768,wsize=32768,nolock,nfsvers=3,async 0 0

Both mounts are successful in a way that the

sudo mount -a

does not give any error. When I'm going in the directory /mnt/video I cannot complete a ls statement, the command just hangs. I can do this for a very small directory with only 2 subdirectories inside, but going above just takes forever. The strage thing I find is that this does work for tcp. (and tcp is very fast)

now I know how UDP works, but still I think linux is able to handle udp connections, even for file shares, no?

1 Answer 1

2

I suspect the problem with the UDP NFS mount is the value of your rsize and wsize causing packet fragmentation on the network and dropped packets in the kernel, see http://nfs.sourceforge.net/nfs-howto/ar01s05.html the section on Overflow of Fragmented Packets. I would just remove the rsize and wsize parms and remount.

4
  • Thanks PaperMonkey for your answer, but still no luck. I do notice the command is faster when I'm getting the 'ls' of a smaller folder (not much subfolders) but with a lot of subfolders, it still hangs. I follow you with the block size, it is something i got from a blog to optimize my speed over the network. I guess the pacakges get lost somewhere on my network. Is there a way to follow these?
    – jelle
    Jan 1, 2015 at 21:00
  • Are you getting any packet loss between your NAS and your pi? Run this from your pi ping -s 1472 192.168.0.5 let run for a while and see if you get some loss. Jan 2, 2015 at 15:03
  • I think so, I'll let it run and get back with the resulsts. edit: everything seems normal
    – jelle
    Jan 3, 2015 at 19:45
  • Not working for me, ar the problem doesn't appear to be the size at all, but something at the start phase: 11:36:25.941232 IP 172.17.17.200.49722 > 172.17.17.159.2049: NFS request xid 1474471476 40 null 11:36:25.943374 IP 172.17.17.152.2049 > 172.17.17.200.49722: NFS reply xid 1474471476 reply ok 24 11:36:25.943407 IP 172.17.17.200 > 172.17.17.152: ICMP 172.17.17.200 udp port 49722 unreachable, length 60
    – Hvisage
    Sep 29, 2016 at 12:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .