Why Do I Have Slow NFS Writes from Client to Server?
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
Why Do I Have Slow NFS Writes from Client to Server?
I am getting super-slow writes from my NFS client to the server on my home network. Most of the time the file transfer seems to hang on the client, but eventually finishes. While writing, accessing other folders on the NFS share causes Nautilus to become unresponsive. This has only happened after my upgrade from Ubuntu Jaunty to Ubuntu Karmic.
Here's the info. My server is running Jaunty (everything works, no need to upgrade). Serverside /etc/exports:
One side-affect of the upgrade to Karmic is that my wireless connection signal on the client is significantly less (around 50%; before it was around 80%--same location). Internet speed is still solid, though, and I can ping my server with no packet loss.
Any ideas or suggestions as to resolve this issue would be greatly appreciated, 'cause it's taking a hour just to copy a distro ISO to my server! While copying, sometimes my system will become unresponsive as well. Not cool.
I posted at the Ubuntu forums as well but no reply yet. Unfortunately this is somewhat urgent for me since I do all of my backups from the client to the server, and this is causing general performance issues on the client.
I'm assuming your using a reasonably new version of NFS (at least ver 3).
I would suggest you try optimising the size of the rsize,wsize values. Most systems I setup have been using values of 32768 for both rsize and wsize. These may not be optimal for your system but you can test the speed of the transfer with dd.
try running the above command a few times to get an idea of the average speed. Then change the mount options and re-run the tests to see if the average is better or worse. You should be able to diagnose the optimal settings for your system this way.
I appreciate the response! I tried changing my wsize and rsize values multiple times like you suggested, and there were slight improvements, however I was never able to get a write speed over 114 kb/s.
I also noticed that when writing the file, reading from the nfs share also became painfully slow. Is this normal?
I am not surprised by this the poorer the signal you have the slower the transfer will be. The position of the wireless access point may make a difference to the signal level so moving it around may help you with the signal strength.
The problem with wireless is that to ensure reliability the wireless will sacrifice speed for that reliability. The stronger the signal you have then generally the better your wireless will perform.
I have the same problem at home in the fact that my wireless is fine for performing internet browsing and downloading but for large file transfers I have a cable back to the router that I can use to get optimal speed.
I would suggest trying moving your wireless access point and then trying again just remember to only move one item at a time or you will be unable to figure out what is making the difference.
The problem with reading from the NFS share is one of bandwidth. If your system is writing over the network and consuming all bandwidth available (which if your writing a large file it will be) then you will find reads slower as they have to contend with the write for the same bandwidth.
I really appreciate your help in troubleshooting this problem and explaining the bandwidth/signal-strength issue. Moving the router about 6 feet closer to the router didn't really help much, so I decided to try switching wireless drivers from the native Linux one to the Windows driver via ndiswrapper. This seems to have solved my problem. I have much stronger signal (close to 65%), and my NFS writes are now full speed (around 2.5 mbps). Looks like an issue with Karmic's wireless drives...kind of disappointing to see a regression like this.
Anyways, thanks again for helping out and teaching me a bit along the way!
Glad it helped, hopefully there will be some updates for the driver in the linux kernel that will stop you from having to use the ndiswrapper one at some point in the future.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.