Skip site navigation (1)Skip section navigation (2)
Date:      05 Nov 2002 15:31:00 +1000
From:      Duncan Anker <d.anker@au.darkbluesea.com>
To:        freebsd-questions@freebsd.org
Subject:   NFS Performance woes
Message-ID:  <1036474260.6619.48.camel@duncan>

next 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.

Shortly thereafter, our project manager complained about a lot of
timeouts on his web servers. More research suggested that bigger is not
always better for NFS buffers (some articles indicate that r/w buffers
are only for UDP, which is clearly rubbish in this case). I have tried
fiddling with varying parameters to find optimal values, but I am having
difficulty working out what they are.

Our web servers all mount via NFS - my expectation therefore is that I
should see approximately equal amounts of traffic in and out (working on
the principle that the web request and the file request cancel out and
the file read from the NFS server is going out unmodified). My
observations have borne out this expectation. However, tuning various
values from 1k up to 8k has resulted in slight increases in traffic - I
don't know whether this is more throughput or transmission retries. Once
I get up to 16k and 32k the amount of traffic into the boxes exceeds the
amount out quite substantially, which seems to indicate problems (and
indeed is causing timeouts).

On the NFS server side of things, we saw a lot of watchdog timeouts,
with the network choking at around 20Mbs. The card in the server is 1Gb
so it really should be able to push through more than that without a
sweat (and it does - it hits about 60Mbs during backups).

There's something pretty screwy going on with all of this. As mentioned,
the server is 1Gb, all the clients are running at 100Mbs. All machines
are on the same switch, so there is nothing to degrade the performance.
The NFS section of the FreeBSD handbook talked about slow FreeBSD
clients with highspeed servers, and I am wondering if this is that type
of scenario.

I'd appreciate hearing the experience of others in terms of tuning a
setup like this, or even if someone could point me in the direction of
some more useful analysis tools.

Thanks

--
Duncan Anker
Senior Systems Administrato
Dark Blue Sea




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?1036474260.6619.48.camel>