Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Nov 2002 11:40:13 +0200 (EET)
From:      BigBrother <bigbrother@bonbon.net>
To:        questions@FreeBSD.ORG
Subject:   Re:  NFS Performance woes
Message-ID:  <20021105112912.Q69960-100000@bigb3server.bbcluster.gr>
In-Reply-To: <bulk.3955.20021104224133@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help


>I recently did some research into NFS performance tuning and came across
>the suggestion in an article on onlamp.com by Michael Lucas, that 32768
>is a good value for the read and write buffers. His suggestion is these
>flags:
>
>tcp,intr,nfsv3,-r=32768,-w=32768
>
>I used these options (I found tcp was mandatory, as we have multiple IPs
>and UDP was refusing to play nice), also adding dumbtimer to avoid the
>log messages about server not responding.





According to my experience UDP is much preffered for NFS transport
protocols. Also try to have the NFSIOD daemon being executed on every
machine by putting in the /etc/rc.conf

nfs_client_enable="YES"
nfs_client_flags="-n 10"


[u may put more than 10 instances if u suspect that more than 10
simultaneous transactions will happen]


Also use the -w=32768,-r=32768   switch only on the machines that have a
fast cpu and a good network card [e.g. nestat -w 1, doesnt show errors
under heavy load]

On all the other machines dont put any w,r values [which will default to
8k blocks]

In some machines of mine I have even used blocks of -r=4096,-w=4096
because they were old machines that could not keep up with the traffic and
they were complaining about mbufs [they run out of mbufs and after some
time they crashed]..(and because they machines were diskless it was unable
to change the value of mbufss, after the kernel loading the value is
readonly and cannot be changed).


Use good networking hardware...scrappy hardware will certainly put you
into great trouble.

If you use TCP for NFS on a 1GB network you will sure have problems on
your machines and they will not be able to keep up. TCP causes a great
overhead. UDP doesnt.

So bottom line: a) Use UDP
                b) Run a lot of NFSIOD - the more the better
                c) Examine what is the best block size for every host
	   	   idividually! (dont assume that 32k block is good
	           for every host)


Hopes it does your job......I was searching for over 3 months when I once
dealt with this....Read also from the 'Sun' site the 'Optimizing and
Tunning NFS' guide which is a nice PDF document that you can download for
free, and has a lot of interesting things similar with FreeBSD!





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021105112912.Q69960-100000>