Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Write speed problems over NFS (only one way though)
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
deflin39
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jun 2004
Posts: 105
Location: /dev/BIYJ

PostPosted: Wed Feb 02, 2005 2:42 am    Post subject: Write speed problems over NFS (only one way though) Reply with quote

I'm gonna try to explain this the best I can. First some stats info.

I have two boxes:
Bart:
P4 2.53 1gig
/dev/hda -> WD 30gig 7200
/dev/hde -> WD 30gig 7200 (through pci expansion card)

Moe:
AMD 600 256megs
/dev/hdc -> WD 20gig 5200
/dev/hdd -> WD 80gig 8M buf 7200

All connections have the proper UDMA IDE cables.

I have moe:/dev/hdd1 exported NFS to bart:/mnt/pub1

Here is the problem. It takes almost 4x longer to cp or mv a file from bart->moe than moe->bart

Code:
deflin39@bart deflin39 $ pwd
/home/deflin39
deflin39@bart deflin39 $ ls -la /mnt/pub1/simpsons/#7G08\ -\ Simpsons\ Roasting\ on\ an\ Open\ Fire.avi
-rw-r--r--  1 deflin39 users 161505280 Feb  1 20:31 /mnt/pub1/simpsons/#7G08 - Simpsons Roasting on an Open Fire.avi
deflin39@bart deflin39 $ time mv /mnt/pub1/simpsons/#7G08\ -\ Simpsons\ Roasting\ on\ an\ Open\ Fire.avi .
                                                                                                                                               
real    0m14.956s
user    0m0.044s
sys     0m0.869s
deflin39@bart deflin39 $ time mv \#7G08\ -\ Simpsons\ Roasting\ on\ an\ Open\ Fire.avi /mnt/pub1/simpsons/


real    0m52.444s
user    0m0.043s
sys     0m0.355s


The speeds are fine between drives that are in the same box. It only seems to happen when cp from bart->moe. What might be causing this?

deflin39
_________________
“The musicians today, who don't do drugs, and in fact speak out against it-"We're rockers against drugs"-boy, they suck. Suck. Ball-less, soul-less, spirit-less, corporate little bitches, suckers of Satan's cock, each and every one of them”–BillHicks
Back to top
View user's profile Send private message
texas1emt
Guru
Guru


Joined: 27 Oct 2003
Posts: 352
Location: San Antonio, TX

PostPosted: Wed Feb 02, 2005 2:58 am    Post subject: Reply with quote

You might want to check that you have async in your /etc/exports on both machines. That will speed up things a great deal on the machine that's slow, if that's the problem.
_________________
M. Hayden - San Antonio, TX
Back to top
View user's profile Send private message
JjcampNR
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2003
Posts: 127
Location: Massachusetts, USA

PostPosted: Wed Feb 02, 2005 3:05 am    Post subject: Reply with quote

One other thing to keep in mind is that the performance of a PCI expansion card is no where near what a drive would be able to perform at if you had it directly into the IDE/SATA bus. That being said, you need to consider the possibility you're maxing out your PCI bus.

How many devices are running on the same PCI bus as your expansion card? If you're running ethernet, sound card, expansion card, etc. through one bus you're probably going to suffer some slowdown because the PCI bus may be maxed out. This may be the case if the files you're trying to copy to the other box are mainly located on the drive that's hooked-up to the expansion card. Since you're pulling files from a drive, through the PCI bus, and over ethernet which may also be on the PCI bus I'm sure traffic on that bus is getting congested.

Try swapping your drives around and see if that helps (ie put your system disk on the expansion card and the storage disk on the IDE channel). If this fixes the problem you'll know what's wrong, although leaving your system disk on the PCI bus isn't really great from a performance point of view.

--Josh
_________________
Damn the man, fight the power!

http://www.torquenetworks.com
Back to top
View user's profile Send private message
texas1emt
Guru
Guru


Joined: 27 Oct 2003
Posts: 352
Location: San Antonio, TX

PostPosted: Wed Feb 02, 2005 3:07 am    Post subject: Reply with quote

Good point, JjcampNR. I didn't even think about that. :-)
_________________
M. Hayden - San Antonio, TX
Back to top
View user's profile Send private message
JjcampNR
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2003
Posts: 127
Location: Massachusetts, USA

PostPosted: Wed Feb 02, 2005 3:11 am    Post subject: Reply with quote

Thanks! Let us know if it works better switching the drives around or adding async to /etc/exports. If things are still slow I'll do more brain storming.

Another thing I just thought of is check to make sure DMA is actually set on the machine that's running slowly. Although you may have cables and have it set correctly in the kernel, you may have to use hdparm to turn it on.

--Josh
_________________
Damn the man, fight the power!

http://www.torquenetworks.com
Back to top
View user's profile Send private message
deflin39
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jun 2004
Posts: 105
Location: /dev/BIYJ

PostPosted: Wed Feb 02, 2005 3:20 am    Post subject: Reply with quote

In the test above, I did not involve the drive on the PCI expansion card, I was using the drive on /dev/hda. Though using the drive on the PCI expansion card yielded similar results (The only other thing on my PCI bus is a sound card).

I will add the async option and report back, however I read that async is not the default behavior anymore due to possible loss of data during power faults.

deflin39
_________________
“The musicians today, who don't do drugs, and in fact speak out against it-"We're rockers against drugs"-boy, they suck. Suck. Ball-less, soul-less, spirit-less, corporate little bitches, suckers of Satan's cock, each and every one of them”–BillHicks
Back to top
View user's profile Send private message
texas1emt
Guru
Guru


Joined: 27 Oct 2003
Posts: 352
Location: San Antonio, TX

PostPosted: Wed Feb 02, 2005 3:24 am    Post subject: Reply with quote

deflin39 wrote:
I will add the async option and report back, however I read that async is not the default behavior anymore due to possible loss of data during power faults.


That's one thing to worry about. Be careful. Might want to use UPS backups if this is a high priority network transfer solution.
_________________
M. Hayden - San Antonio, TX
Back to top
View user's profile Send private message
deflin39
Tux's lil' helper
Tux's lil' helper


Joined: 06 Jun 2004
Posts: 105
Location: /dev/BIYJ

PostPosted: Wed Feb 02, 2005 3:29 am    Post subject: Reply with quote

Code:
deflin39@bart deflin39 $ time mv /mnt/pub1/simpsons/#7G08\ -\ Simpsons\ Roasting\ on\ an\ Open\ Fire.avi .
 
real    0m14.267s
user    0m0.050s
sys     0m0.809s
deflin39@bart deflin39 $ time mv \#7G08\ -\ Simpsons\ Roasting\ on\ an\ Open\ Fire.avi /mnt/pub1/simpsons/
 
real    0m15.038s
user    0m0.045s
sys     0m0.503s


Well, it appears async does the trick. Not knowing much about the NFS protocol, it find it strange that the sync option only affects one direction of the file transfer.

Well, this is nice, but it does worry me about loosing the data.

deflin39
_________________
“The musicians today, who don't do drugs, and in fact speak out against it-"We're rockers against drugs"-boy, they suck. Suck. Ball-less, soul-less, spirit-less, corporate little bitches, suckers of Satan's cock, each and every one of them”–BillHicks
Back to top
View user's profile Send private message
texas1emt
Guru
Guru


Joined: 27 Oct 2003
Posts: 352
Location: San Antonio, TX

PostPosted: Wed Feb 02, 2005 3:34 am    Post subject: Reply with quote

I use NFS w/async all the time... it would have to be a TREMENDOUSLY unlucky power outage during the exact same time you're making an NFS transfer.
_________________
M. Hayden - San Antonio, TX
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