hdtodd
Posts: 16
Joined: Tue Mar 04, 2014 1:53 am

RPi-3B+ NFS Server Disconnects

Sun Dec 09, 2018 3:48 pm

I'm trying to time file transfer times to a RPi-3B+ serving over various protocols, and I ran into an odd problem. I'm not sure where to start looking to fix it, and I'm hoping someone can suggest a starting point.

Source computer is a Mac Mini running High Sierra. Target is a RPi-3B+ 4.14.79-v7+ #1159. Router is a Linksys E3000, Firmware Version: 1.0.06. All OSes/firmware up to date as of the last few days. All connections via GB Ethernet. NFS service on the RPi has as /etc/exports:
/home/hdtodd/nfs 192.168.1.0/24(rw,all_squash,insecure,async,no_subtree_check,anonuid=502,anongid=502)
I've rebooted the RPi a couple of times to make sure I had a cleanly-started system.

I started testing by copying 10**6 1K blocks of random data from source to target. SMB worked fine. Tried the same command with the target mounted via NFS, and it hung the target RPi. Tinkered a bit and found that small transfers work fine, but after about 5MB of transfers, it hangs. Sequence demonstrating logged below.

At the time the transfer hangs, a connection on another SSH connection also hangs -- will not respond to any keystrokes, and any attempt to open another SSH connection in a new terminal window hangs as well ("host is down").

This isn't critical ... I'm just trying to figure out if I can reliably use NFS for transfers of arbitrary size to the Pi. But this particular constraint must be of my own creation -- didn't find anyone else reporting this problem. So I wonder if there's an obvious mistake in my setup.

Any suggestion on where to look?

=======================================================
mount -t nfs -o rw pi-1:/home/hdtodd/nfs p

bash-3.2# time dd if=/dev/random of=p/null_data bs=1024 count=10
10+0 records in
10+0 records out
10240 bytes transferred in 0.000465 secs (22014184 bytes/sec)

real 0m0.024s
user 0m0.002s
sys 0m0.004s
bash-3.2# time dd if=/dev/random of=p/null_data bs=1024 count=100
100+0 records in
100+0 records out
102400 bytes transferred in 0.005630 secs (18188224 bytes/sec)

real 0m0.045s
user 0m0.001s
sys 0m0.010s
bash-3.2# time dd if=/dev/random of=p/null_data bs=1024 count=1000
1000+0 records in
1000+0 records out
1024000 bytes transferred in 0.294398 secs (3478284 bytes/sec)

real 0m0.354s
user 0m0.003s
sys 0m0.065s
bash-3.2# time dd if=/dev/random of=p/null_data bs=1024 count=1000000
dd: p/null_data: Input/output error
5378+0 records in
5377+0 records out
5506048 bytes transferred in 43.478419 secs (126639 bytes/sec)

real 0m43.499s
user 0m0.009s
sys 0m0.319s

hdtodd
Posts: 16
Joined: Tue Mar 04, 2014 1:53 am

Re: RPi-3B+ NFS Server Disconnects

Sun Dec 09, 2018 7:54 pm

Tried the same experiment from Pi-3B+ to Pi-3B+, using /dev/zero as input, and got timings of 6.9MB/sec for SMB and 7.4MB/sec for NFS.

Tried again (with if=/dev/zero) from the Mac and got 19.6MB/sec for SMB and hung for NFS.

Also, my wife reported that her Internet access hung for a number of times this morning, and she had to re-connect her WiFi to the router. Asked if I had been fiddling with the router. :oops: Not intentionally, but apparently my experiment might have gotten hung up on the router rather than the client or server.

I intend to replace the router soon anyway, and I've got enough info to proceed with my original project (TimeMachine backup to the Pi).

I'd welcome any suggestions for things to check, but for now I'm going to quit trying to diagnose this.

Return to “Networking and servers”