Operating System - Linux
1828488 Members
2115 Online
109978 Solutions
New Discussion

Re: Linux NFS share extremely slow

 
Donny Jekels
Respected Contributor

Linux NFS share extremely slow

I am exporting a ext3 FS from one Linux box (redhat ES 4.0 Update2) - has 1G interface

to all other linux boxes also with 1g interface on the same Cisco 6509 blade.

however the NFS tranfer crawls in comparison to a rsync job

I mounted the clients with rsize=8192,wsize=8192 that does'nt help either.

any ideas, I am at a dead end :-(
"Vision, is the art of seeing the invisible"
5 REPLIES 5
Ivan Ferreira
Honored Contributor

Re: Linux NFS share extremely slow

But rsync only transfers modified files, have you ensured that the bytes transfers are the same when you do your tests?

Try using udp as the protocol, also, not always a large block size is the best, you can try different values.

Check the output of netstat -ni, check for collisions and errors, ensure that your switch and network adapter are negotiating the right speed, use ethtool for this.

See also:

http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.doc/aixbman/prftungd/nfscliprfmon.htm
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Donny Jekels
Respected Contributor

Re: Linux NFS share extremely slow

i should have added that the rsync job transfered /opt/ to remote:/opt/ and there is no files on the remote

"Vision, is the art of seeing the invisible"
Manuel Wolfshant
Trusted Contributor

Re: Linux NFS share extremely slow

Since rsync works ni

using UDP instead of TCP might speed things a bit. you might also increase the windows' size (for instance, I am using rsize=32768,wsize=32768,proto=tcp,soft). The best bet is to try different settings and see which one suits you.
Something else you might try (beware, it might not be convenient for you) is to mount the share with the "noatime" option. Other possible options are the "async" mode and writeback journaling.


cedber
Occasional Advisor

Re: Linux NFS share extremely slow

There is another problem...
You shouldn't have to change for UDP or window size to work perfectly !
Don't you have an automount problem or similar ?
Bill Thorsteinson
Honored Contributor

Re: Linux NFS share extremely slow

If you run rsync wuth stats output you will
likely find you aren't copying much. I
use rsync to copy web logs as I only have
to copy the last hours worth of data on
each copy even though the file is growing.
With NFS I would have to copy the whole file.
As the weblogs rotate weekly it makes a
big difference at the end of the week.

If copies run at differenct speeds depending
on which direction. Read is fast but write is
slow or vice versa, it likely a duplex issue.

You could enable async access to the share.
This risks loosing data if the server goes
down between the time it receives a block and
gets it written to disk. A good UPS would
reduce that risk.