Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NFS async transfers of large files hang the client machine
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
volumen1
Guru
Guru


Joined: 01 Mar 2003
Posts: 393
Location: Missoula, MT

PostPosted: Tue Jun 15, 2010 3:25 am    Post subject: NFS async transfers of large files hang the client machine Reply with quote

Ok. So, this took me a long time to figure out what exactly was burning me, so please be patient because I want to give you as much information as possible.

Long story short, when I try to transfer large (greater than 1G) files over NFS, it usually results in the hang of my client machine. When I watch my gkrellm monitors, what happens first is that my client hard drive activity pegs at like 100M/s for a few seconds and then I start to see roughly 3-5M/s of transfers over my network interface. This goes for about 10 seconds and then, usually, the client machine hangs. If I wait a long time (10-30 minutes) sometimes it will come back, but I often don't have the time for this.

Long story short, this evening I've discovered that this problem doesn't happen if change my NFS mount options from async to sync. (The fact that it never happens on CIFS mounted shares lead me down this path).

So, here's an example fstab entry for a share that does this:
Code:

nasserver.mydomain.com:/USBBACKUP /usbbackup         nfs             tcp,async,nfsvers=3,defaults,rsize=32768,wsize=32768 0 0

So, just changing this from async to sync makes my problem go away, but I want to figure out what is actually happening. My guess is that it's related to the buffer that NFS uses to cache writes.

This is a 64-bit system. Here's uname -a info:
Code:

Linux clientmachine 2.6.32-gentoo-r7 #2 SMP PREEMPT Wed Jun 9 10:04:31 MDT 2010 x86_64 Dual Core AMD Opteron(tm) Processor 290 AuthenticAMD GNU/Linux


The system has 5G of RAM and 15G of swap.

The problem is easily reproducible with either nfs-utils 1.1.4-r1 or 1.2.2-r1. The NFS server is a ReadyNAS appliance from Netgear, however, I can also make it happen when writing to an NFS share on a popcornhour network media tank. It appears to be entirely client related.

Hmm... I'm sure there's more information I could provide, but I'm a little frazzled right now. Does anyone have any ideas? I'm hoping to make async work because I expect it to be a little bit faster, but maybe I should just drop it and stay with synchronous transfers.
_________________
I was born with a freakin' dice bag on my belt.
-- www.howsyournetwork.com
Back to top
View user's profile Send private message
Jimini
Guru
Guru


Joined: 31 Oct 2006
Posts: 595
Location: Germany

PostPosted: Tue Jun 15, 2010 7:01 am    Post subject: Reply with quote

I have experienced this problem a few months ago, too. Unfortunately, I am not sure how I solved it - but my server (in this case a NFS client) mounts a NFS share with the options "hard" and "intr" and it works fine. Every morning the NFS-client mounts the share and creates a tarball on it. A few days ago, an other client had exactly the same problem as you describe it, it mounted the share with "defaults". So I guess, it could be worth a try to test your setup with the options "hard" and "intr".

Best regards,
Jimini
_________________
"The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents." (H.P. Lovecraft: The Call of Cthulhu)
Back to top
View user's profile Send private message
volumen1
Guru
Guru


Joined: 01 Mar 2003
Posts: 393
Location: Missoula, MT

PostPosted: Tue Jun 15, 2010 7:07 am    Post subject: Reply with quote

You are also using "async" as an option?
_________________
I was born with a freakin' dice bag on my belt.
-- www.howsyournetwork.com
Back to top
View user's profile Send private message
Jimini
Guru
Guru


Joined: 31 Oct 2006
Posts: 595
Location: Germany

PostPosted: Tue Jun 15, 2010 7:12 am    Post subject: Reply with quote

Oh, I forgot that.
This is the entry from the server's /etc/exports:
Code:
/home/share/backup/Aleph 10.0.0.1(rw,subtree_check)


This is the entry from the client's fstab:
Code:
10.0.0.2:/home/share/backup/Aleph       /home/backup/   nfs     hard,intr


Best regards,
Jimini
_________________
"The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents." (H.P. Lovecraft: The Call of Cthulhu)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum