View previous topic :: View next topic |
Author |
Message |
ARC2300 Apprentice
Joined: 30 Mar 2003 Posts: 267
|
Posted: Sat Oct 16, 2004 3:58 am Post subject: NFS and transfer speeds |
|
|
I just set up NFS on my network server and Gentoo box.
Transferring files from the server to the client is fast, maxing my LAN out at 12.2MB/s. However, transferring files from the client to the server is slow, 350KB/s to be exact.
I compiled server support and client support in the kernel for the Gentoo server, and just client support for the Gentoo client. Is there an option somewhere I have to tick, or is this just inherent for NFS??
My options for the mounts are rw,sync (reading a guide on the net somewhere, "sync" was the way to go in case the server ever locked or something to that affect). _________________ It's fun to take a trip
Put acid in your veins |
|
Back to top |
|
|
hardcore l33t
Joined: 01 Nov 2003 Posts: 626 Location: MSU, MI
|
Posted: Sat Oct 16, 2004 7:24 am Post subject: |
|
|
Do you have portmap started on the client? And you might want to try adding NFS server support on the client. _________________ Nothing can stop me now, cuz I just don't care. |
|
Back to top |
|
|
hinken Tux's lil' helper
Joined: 16 Jan 2004 Posts: 109
|
Posted: Sat Oct 16, 2004 11:03 am Post subject: |
|
|
Isn't starting portmap only the solution to slow mounting not transfer speed?
Im having the same problem as ARC2300 but I'm looking for another protocol for streaming. Lufs is the fastest I have tried but is a really pain to install.(only nitro and love have a patch for it).
my fstab looks like this for nfs:
Code: |
server:/xbox /mnt/xbox nfs rsize=32768,wsize=32768,timeo=5 0 0
|
Good luck!
Ps. post if you manage to get descent speed.
Last edited by hinken on Sat Oct 16, 2004 3:04 pm; edited 1 time in total |
|
Back to top |
|
|
joaander Tux's lil' helper
Joined: 30 Apr 2004 Posts: 132
|
Posted: Sat Oct 16, 2004 2:59 pm Post subject: |
|
|
I had this exact same problem with NFS (machine A to B fast, B to A slow). I spent a long time trying to debug it and noticed that samba had a similar behavior. Eventually, i tried iperf between the two machines which showed the same also: 94Mbit A to B. ~200K/s B to A. So, in my case, the problem was at the network level.
I eventually found the problem by borrowing a friends 100baseT switch for a day, with which i experience none of these problems. I promptly orderd a replacement switch and threw my old one out, as it seems to have been the problem. I've had no problems since.
YMMV, but I suggest trying iperf and seeing what sort of network transfers you get between the two machines. |
|
Back to top |
|
|
ARC2300 Apprentice
Joined: 30 Mar 2003 Posts: 267
|
Posted: Sat Oct 16, 2004 4:28 pm Post subject: |
|
|
I will try that, but I sure hope it's not my switch, as it's a 3Com OfficeConnect 10/100. But it could be that for some reason the link is downgraded when transferring from client to server.
I will check that out, though, and report back. Thanks for the suggestions, all.
[edit]I ran iperf, and found that UDP to and from the server and client was extremely slow. . .so I'm going to try compiling in server support to the client and NFS over TCP to see if that helps.
[edit2]Did no good whatsoever to compile server support into the client's kernel. If anyone has any other suggestions, please, do post. I'll keep looking around for a solution since others have the same problem.
And running iperf with TCP shows about 12-13MB/s up and down, so I know now that it's a software thing, not hardware related. _________________ It's fun to take a trip
Put acid in your veins |
|
Back to top |
|
|
hardcore l33t
Joined: 01 Nov 2003 Posts: 626 Location: MSU, MI
|
Posted: Sat Oct 16, 2004 5:45 pm Post subject: |
|
|
It could be your network card drivers. Check to see if the manufacturer has drivers on their site. _________________ Nothing can stop me now, cuz I just don't care. |
|
Back to top |
|
|
ARC2300 Apprentice
Joined: 30 Mar 2003 Posts: 267
|
Posted: Sat Oct 16, 2004 6:50 pm Post subject: |
|
|
hardcore wrote: | It could be your network card drivers. Check to see if the manufacturer has drivers on their site. |
If that were the case, though, they'd both have suck for upload.
I forgot to mention that they're both 3C905 NIC's (or 3C950's, can't remember). _________________ It's fun to take a trip
Put acid in your veins |
|
Back to top |
|
|
hardcore l33t
Joined: 01 Nov 2003 Posts: 626 Location: MSU, MI
|
Posted: Sat Oct 16, 2004 6:56 pm Post subject: |
|
|
Try adding these to your mount options
Code: | rsize=8192, wsize=8192 |
_________________ Nothing can stop me now, cuz I just don't care. |
|
Back to top |
|
|
ARC2300 Apprentice
Joined: 30 Mar 2003 Posts: 267
|
Posted: Sat Oct 16, 2004 7:21 pm Post subject: |
|
|
hardcore wrote: | Try adding these to your mount options
Code: | rsize=8192, wsize=8192 |
|
That didn't help.
However, putting "async,no_subtree_check" for my options in my /etc/exports file on the server boosted the transfers from client to server back up to Samba speeds, but it's still half what NFS is capable of doing.
I've also checked hdparm to make sure DMA and all that other fun stuff is enabled on the drives, and it is. top reveals that CPU usage is only 4% when receiving files via NFS on the server, so I know it's not the CPU on the server limiting it. _________________ It's fun to take a trip
Put acid in your veins |
|
Back to top |
|
|
ARC2300 Apprentice
Joined: 30 Mar 2003 Posts: 267
|
Posted: Sat Oct 16, 2004 7:55 pm Post subject: |
|
|
Okay, I think I have something!!!
My options for NFS mounts on my client are rw,async,hard,intr and my transfers now are at 12MB/s!!!
The /etc/exports options for my shares on the server are rw,sync.
Changing the options in /etc/fstab on the client speeds up transfers to the server, but changing the options in the /etc/exports file on the server doesn't really do a whole lot.
Reading on sync and async on sourceforge, the only thing I really got out of it was that if your server is prone to reboots a lot, use sync. If not, async shouldn't give you much troubles, then.
Here's a link:
http://nfs.sourceforge.net/nfs-howto/performance.html#SYNC-ASYNC
[edit]I used "time" to time the copy of several large movie files from server to client, and then client to server. The client to server is a little slower (approximately 2 seconds for every 100MB), so it's not that much of a problem. _________________ It's fun to take a trip
Put acid in your veins |
|
Back to top |
|
|
|