LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-12-2009, 10:38 AM   #1
distortedstar
Member
 
Registered: Jan 2004
Location: West Texas
Distribution: Ubuntu 7.04/MythDora 4/PuppyLinux
Posts: 78

Rep: Reputation: 15
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:
Quote:
/home/nathan/MediaDrive/ 10.0.0.2(rw,no_root_squash,insecure,sync,no_subtree_check)
Client side fstab:

Quote:
10.0.0.3:/home/nathan/MediaDrive /media/MediaDrive nfs rsize=1024,wsize=1024,timeo=14,intr,users,auto
Client side /etc/sysctl.conf:

Quote:
net/ipv4/ipfrag_high_thresh=524288
net/ipv4/ipfrag_low_thresh=393216
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.
 
Old 11-18-2009, 05:30 AM   #2
cardy
Member
 
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121

Rep: Reputation: 19
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.

dd if=/dev/zero of=/mnt/mynfsmount/tempfile bs=64k count=4096

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.
 
Old 11-18-2009, 01:57 PM   #3
distortedstar
Member
 
Registered: Jan 2004
Location: West Texas
Distribution: Ubuntu 7.04/MythDora 4/PuppyLinux
Posts: 78

Original Poster
Rep: Reputation: 15
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?
 
Old 11-19-2009, 04:05 AM   #4
cardy
Member
 
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121

Rep: Reputation: 19
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.
 
Old 11-19-2009, 10:23 AM   #5
distortedstar
Member
 
Registered: Jan 2004
Location: West Texas
Distribution: Ubuntu 7.04/MythDora 4/PuppyLinux
Posts: 78

Original Poster
Rep: Reputation: 15
Lee,

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!
 
Old 11-19-2009, 10:36 AM   #6
cardy
Member
 
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121

Rep: Reputation: 19
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nfs server on ubuntu doesn't play nice with nfs client on solaris mathiraj Linux - Networking 11 09-15-2009 02:08 PM
Can't connect from slackware nfs client to rhel nfs server llattan Linux - Server 2 04-21-2009 09:49 AM
Windows 2003R2 NFS Server /Linux NFS client khalil_noura Linux - Networking 0 01-14-2009 11:06 AM
Slow Nfs server/client Xeratul Linux - Networking 1 06-11-2006 06:45 PM
NFS client = Linux, NFS server = Mac OS X Tiger --> Hell of a problem make Linux - Networking 9 03-10-2006 05:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration