I have a NFS server at home which exports a directory using the following export options:
/dir/at/server client(rw,no_subtree_check,no_root_squash,async)
On the client I use the following mount options in /etc/fstab:
server:/dir/at/server /dir/at/client nfs proto=tcp,_netdev,vers=3,rw,async
When I copy a single (large) file from server->client or vice versa then iftop gives a throughput rate of approximately 15Mbit/s which is absolutely reasonable regarding my network hardware infrastructure (wifi interface of the server is attached to the usb hub which is sharing its bandwith with the hdd).
However, in the shared directory I have a couple of snapshot directories having thousands of files and subdirectories. Sometimes I want to delete some directories on the server remotely using NFS, so I issue:
rm -R /dir/at/client/subdir
on the client. But the command needs about 20-40 minutes to finish. So I checked my throughput rate while the command runs and it gives approx. 0.3 Mbit/s. The actual saturation of the network connection is thus not reached. The problem seems to be the latency of thousands of NFS calls and acknowledgements.
In the server context The HDD is locally mounted as an ext4 filesystem using the async mount option. When I issue the above rm command locally on the server, then it takes about 3-4 minutes to complete.
I am not sure what I can do to increase the NFS performance regarding those filesystem operations like rm and cp when they are issued remotely. As you can see I am using async whereever I can and I also using tcp ports.
What else do I have to take into consideration?
Update: The server is providing NFSv3 and as you can see the client has the mount option vers=3 enabled
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 292
تاريخ: جمعه
15 مرداد
1395 ساعت: 18:04