[SOLVED] NFS write performance drops to a crawl after few seconds and can't be cancelled
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
NFS write performance drops to a crawl after few seconds and can't be cancelled
Server and clients are Debian Wheezy 7.4, fully updated.
Network is full gigabit, managed HP procurve switches, full cat6 cabling.
The problem with NFS is when I copy a large file to the server the performance starts fast, 980mbit, flat line (I watch this with system monitor). Then it dips for a few seconds, and comes back at 980mbit. It does this once or twice and then it drops to come back at 5mbit, drops, etc. From then on it fluctuates but never exceeds 10 or 12mbit. It takes ages to copy a few gigabyte to the server. This copy job can't be stopped or cancelled, can't even be killed from another terminal with root. Eventually, it finishes.
This same thing happens whether I use dd or rsync to the server. If it's using the NFS share, it shows this behavior.
When I share the same directory using Samba, there is no problem.
When I test with iperf, there's no problem.
I tested using different rsize/wsize values, different clients. All show the same behavior.
I found an interesting article about Broadcom NIC's not offloading properly and using ethtool to enable/disable offloading settings on the NIC. The server has a Realtek NIC but I tried it anyways, different offloading settings but it changed nothing.
When I copy something over Samba, system monitor shows a flat line from beginning to end, at 980mbit. Even files of 10GB or larger doesn't matter. Couple of minutes later its done.
The fact that samba en iperf both work fine from different clients leads me to conclude that all the hardware and config is actually oke, and so is the the disk with the shared directory (same disk for NFS and Samba).
Reading from the server over NFS has no problem. Also, writing to an NFS share from the server on a client has no problem either.
It looks like NFS has a problem in my situation but I can't figure it out. I would really like to use NFS over Samba (which has its own problems), most of my stuff runs Debian, only 1 pc runs Windows. Ironic Samba would work better than NFS ...
I think I need to troubleshoot NFS but I've never debugged NFS so I'm hoping some NFS wizard here can help me troubleshoot this.
How did you create the NFS share? Manually (editing relevant files) or via a tool (like Webmin). Sounds like a config error on your machine, could a simple syntax error somewhere
How many disks is the NFS share striped over? What speed are they?
To test, I have created shares on the SSD (ext4, >400MB/s), regular harddisks with ext3 or ext4 (>100MB/s), stripe sets of 2 or 3 disks with mdadm (200MB/s) or, currently, a 6-disk RAIDZ2 on ZFS (>400MB/s). Either way, performance is always higher than gigabit network, otherwise dd or samba would suffer the same fate. Mind you, after a while into the copy job, performance drops to 5-10mbit.
The problem is not with storage. Locally between volumes I copy with 400-500MB/s, sustained.
i had to disable sync mode on my nas and had problem solved
Yes. make sure you are exporting and mounting as async or you will get slower performance (although safer). Also check /var/log/syslog for any messages indicating timeouts or deadlocks.
i had to disable sync mode on my nas and had problem solved
Cool, that fixed it!
I'm stumped though, I'm quite sure I tested that too, its one of the first hits when searching for NFS performance. I must have messed up the testing somehow .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.