NFS slow depending on who establishes connection

NFS slow depending on who establishes connection

Postby DentAr » Jun 25th, '11, 21:25

Hi all,

i have set up nfs in mageia1 and mandriva 2010.2 / kernel 2.6.38.8, both are 64bit machines
If i establish the nfs connection from mageia to mandriva, the speed is as it should be: quick (ok, as quick as a 100 MBit card can be - RTL-8139)
e.g. user@mageia # mount mandriva:/data /mnt
I can copy from mandriva and to mandriva with nearly 12 MB/sec, which is fine.

If i mount the mageia machine on mandriva, then things slow down considerably (around 200 kB/sec):
user@mandriva # mount mageia:/data /mnt
(and yes, the other mount-connection was dropped/umounted before)

Copying files to mageia or from mageia are slooooow....

Any ideas why and what can be done to solve this?
(anything else i can supply for clarification?)

Btw, doing the above stuff between two mandriva machines is working without any problems, either mount on any side gives the expected performance)

Thnx a lot for any idea...
DentAr
 
Posts: 9
Joined: Jun 25th, '11, 21:12

Re: NFS slow depending on who establishes connection

Postby isadora » Jun 25th, '11, 21:39

Very welcome to the Mageia-forum DentAr!!!!

For where it concerns your NFS-connections:
just a shot in the wild:
Check the clients and servers are listed in the /etc/hosts files on all machines concerned.
It may take a lot of time to resolve the hostname.


Edit: sorry, forget about it, this should only concern for making the connection.
Will search deeper for you, and come back later.
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2742
Joined: Mar 25th, '11, 16:03
Location: Netherlands

Re: NFS slow depending on who establishes connection

Postby isadora » Jun 25th, '11, 22:06

Just for having some more information, can you supply the fstab-files of both machines?

Code: Select all
cat /etc/fstab
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2742
Joined: Mar 25th, '11, 16:03
Location: Netherlands

Re: NFS slow depending on who establishes connection

Postby DentAr » Jun 25th, '11, 22:15

Hi,
thanks for the quick reply!
Well, no, the hosts file does not contain any other name besides the localhost-name on all of my linux machines.
For the network-name resolution, i have a router running under dd-wrt which serves the machine-names depending on the mac address of the respective client. And, any linux client is set up using dhcp.

I don't think the name resolution is the problem, as the mount happens nearly instantly (using $ mount mageia:/data /mnt) and on the mageia machine is also a squid proxy running which can be accessed by every other machine using name resolution. (and of course, mageia sees all the other machines as well)

What is different is the mount-string appearing on mageia/mandriva:
- mageia mounting nfs of mandriva:
(excertp of mount-command)
mandriva:/data on /mnt type nfs (rw,vers=4,addr=192.168.3.10,clientaddr=192.168.3.11)

mandriva mounting nfs of mageia:
mageia:/data on /mnt type nfs (rw,addr=192.168.3.11)

Some new ideas?
Thnx
DentAr
 
Posts: 9
Joined: Jun 25th, '11, 21:12

Re: NFS slow depending on who establishes connection

Postby isadora » Jun 25th, '11, 22:28

I already agree where it concerns the name resolution, as i mentioned in the edit of my first reply ;-)

But what is interesting me, are the values for: rsize and wsize, and therefore would like to have the "nfs-lines" in the fstab-files.
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2742
Joined: Mar 25th, '11, 16:03
Location: Netherlands

Re: NFS slow depending on who establishes connection

Postby DentAr » Jun 25th, '11, 22:58

Hi,

there are no nfs-related entries in etc/fstab, the connection is done on demand in the shell, that's why i did supply the connection commands previously.
But, i also tried to connect using expicit rsize and wsize parameters, so far without any change in speed: the copy of files from mandriva to mageia is still slow (~230kB/sec)
As far as i know, the r/wsize params are set to 8192 if none are explicitly given, that's the reason for leaving them out.

commands tried so far:
user@mandriva # mount mageia:/data /mnt -o rsize=8192,wsize=8192
user@mandriva # mount mageia:/data /mnt
user@mandriva # mount -t nfs mageia:/data /mnt

failing commands:
user@mandriva # mount -t nfs4 mageia:/data /mnt

Maybe this is a problem with nfs version4 and mageia not supporting it by default?
Can i change that? Where?
(just an assumption, as a nfs connection between mandriva-mandriva machines is indicating the vers=4 mount-option, see previous post)
DentAr
 
Posts: 9
Joined: Jun 25th, '11, 21:12

Re: NFS slow depending on who establishes connection

Postby isadora » Jun 25th, '11, 23:08

Thanks for purchasing the extra information.

I will come back to you, but not tonight, my batteries are on low.
Maybe others can help you out sooner.
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2742
Joined: Mar 25th, '11, 16:03
Location: Netherlands

Re: NFS slow depending on who establishes connection

Postby doktor5000 » Jun 26th, '11, 09:12

Please show the /etc/exports from both the Mageia and the Mandriva box.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: NFS slow depending on who establishes connection

Postby DentAr » Jun 26th, '11, 23:42

As demanded, the files (drumroll :-)

mageia/mandriva files are set up identically, both machines have a /data partition and a /mnt folder.
Access should be restricted to members of the local network (192.168.3.0)

- /etc/hosts.allow
portmap: 192.168.3.0/255.255.255.0
nfsd: 192.168.3.0/255.255.255.0
mountd: 192.168.3.0/255.255.255.0
EOF

- /etc/hosts.deny
portmap: ALL
nfsd: ALL
mountd: ALL
EOF

- /etc/exports
/data 192.168.3.0/255.255.255.0(root_squash,sync,secure,subtree_check,rw)
EOF
DentAr
 
Posts: 9
Joined: Jun 25th, '11, 21:12

Re: NFS slow depending on who establishes connection

Postby doktor5000 » Jun 27th, '11, 20:32

DentAr wrote:- /etc/exports
/data 192.168.3.0/255.255.255.0(root_squash,sync,secure,subtree_check,rw)
EOF

Are you really 100% sure the /etc/exports is exactly the same on both boxes?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: NFS slow depending on who establishes connection

Postby DentAr » Jun 28th, '11, 11:03

yes,

the /etc/exports are a copy of each other.
Anything wrong with that?
DentAr
 
Posts: 9
Joined: Jun 25th, '11, 21:12


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest

cron