I have played with NFS configuration with openvpn on ADSL connection, I have tried different NFS mount options, here you can find the complete post:
NFS over OpenVPN over ADSL(or slow connection)
I quote here the interesting parts:
I have read lot of posts and I have tried the reasonable subset of suggested solutions, this is the summary of the best tips:
- use a NFS packet size smaller than littler MTU size (default is 8Kbytes, new values should be littler than 1500bytes, few guys suggest 1024bytes)
- use NFS TCP connection type; do not use UDP on ADSL/WANs
- use the NFS async option
- do not set very small timeouts, left the default 60 secs (timeo=600) or.. I have tried with success 10secs (timeo=100) too
- with the hard mount option, let's add the intr option
For linux users, here is a little fstab configuration example for soft mounts:
servername:/shared/ /mnt/foldername/ nfs rw,suid,dev,soft,exec,nouser,async,noauto,timeo=100,user,rsize=1024,wsize=1024,tcp 0 0
and here, for hard mounts:
rw,suid,dev,intr,exec,nouser,async,noauto,timeo=100,user,rsize=1024,wsize=1024,tcp 0 0
NFS over vpn+adsl is still dramatically slow (at the moment I am transferring files at about 150 KB/sec, and this is far better than without the proposed changes).
Please consider that my 7Mbit ADSL has a download bandwidth of 800KB/sec.
PS: I'll also check the openvpn fragmentation later, thanks for sharing. Hope that my findings are going to useful too.
PS2: Please consider that these tips has worked in my environment, I'm not sure they may work as a general rule