When I used NFS first time 15 years ago on Sun it seemed to me the top of progress. And it really was at that time. So dealing mostly with samba during last few years I forgot how actually NFS works until a few days ago when I issued standard “mount server:/directory /mnt/subdir” and tried to compile a project. The performance was HORRIBLE. So I spent some time investigating how to improve NFS performance and found this solution:
mount -o rsize=4096,wsize=4096,hard,intr,async,nodev,upd server:/directory /mnt/subdir
The performance increased dramatically so I can compile my project in NFS-mounted dir almost just like I compile locally. The key performance parameter here is “udp” which makes NFS work over udp instead of tcp. In a few sources I found that this parameter is good only for Linus. Also when you mount with these parameters you’ll see warning that NFS over UDP can cause data corruption, let’s see …
This post is published in Linux, Software.