NFS 4 advice needed

I have set up a NFS4 server ( on Suse ) and have opensuse 11.4 clients

The exports are thus

/shared fsid=0,crossmnt,ro,insecure,root_squash,async,no_subtree,check
/shared/home rw,insecure,nohide,root_squash,async,no_subtree_check,bind=/home
/shared/everyone rw,insecure,nohide,root_squash,async,no_subtree_check,bind=/everyone
… and 2 more like this …

The automap is in LDAP and is thus
(for home )
-fstype=nfs4,rw,soft,async,nodev,nosuid,proto=tcp,retry=10 server1.xxxx.xxx:/home/john.smith
( for everyone and the other 2 )
-fstype=nfs4,rw,soft,async,nodev,nosuid,proto=tcp,retry=10 server1.xxxx.xxx:/everyone

This all works fine but it isn’t blindingly fast - have I gone wrong somewhere ?
BTW I am looking for speed rather than security

If anyone can either help or point me to a good howto I would appreciate it

Ta

Mal

You might like to take a look at TCP/IP tuning.
I’ve aggregated all the info I can find on the Internet related to TCP/IP tuning. Applicable to all Linux distros AFAIK, not just openSUSE.

Optimize and Fix your Network Connection - Su Networking Technical

HTH,
Tony

Can you show what performance you are getting? You can Run hdparm, iozone, bonnie++ or other file system benchmarking tools on both the server and clients and see what speeds you are really getting. Without having some measurements, it is hard to say how far off your speed expectations are from what can be achieved. (I’d really like to see some benchmarks to see what you are really getting.)

What network topology is involved here? Is this all over 100 Mbit ethernet? Gigabit? (With 100 Mbit, you are not going to see anything too fast of course, which is approximatly a whopping 10 MB/sec - NFS overhead)

NFS has a performance penalty, no doubt about it. You can minimize this with certain NFS option, TCP tuning, use of NFS caching on the clients, etc. but if you squeeze every bit of performance possible it may still fall short of what you are hoping for.

If the system are on the same ethernet subnet (they can arp each other) you could try ATA over Ethernet, and ditch TCP/IP altogether.

Index of /repositories/system:/aoetools/openSUSE_Factory

The link Tony provided to his TCP tuning article looks quite good. You can also find TCP tuning info at: Linux Tuning: Expert Guide

Cheers,

On Thu, 06 Oct 2011 08:26:02 GMT interele wrote:

> BTW I am looking for speed rather than security

On the server i use this ‘(rw,async,no_subtree_check)’ in and on the
client i have only ‘auto,rw’ in the fstab where /proc/mount show this:

server:/work/ /server/work nfs4
rw,relatime,vers=4,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=x.x.x.x,minorversion=0,local_lock=none,addr=x.x.x.x
0 0

The performance is nice enough and so i never look for optimizing it :slight_smile:
What be your rsize and wsize?

Many thanks for the replies

I haven’t set wsize and rsize as I thought in NFS4 they negotiated it and those
options only set the maximum.

I’m guessing from the replies that I haven’t done anything horrendously wrong

On Fri, 07 Oct 2011 07:36:02 GMT interele wrote:

> I haven’t set wsize and rsize as I thought in NFS4 they negotiated it
> and those options only set the maximum.

And what shows the nfs line in your /proc/mounts?

> I’m guessing from the replies that I haven’t done anything
> horrendously wrong

I have recognized in the past that re-starting with the minimum of
options and than looking for optimizing helps. And sometimes it is the
network and not nfs.

Good Luck.

Many thanks to everyone who replied

best wishes

Mal