Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Nov 2002 11:52:42 +0200 (EET)
From:      BigBrother <bigbrother@bonbon.net>
To:        questions@FreeBSD.ORG
Subject:   Re: NFS Performance woes
Message-ID:  <20021106114019.W69960-100000@bigb3server.bbcluster.gr>
In-Reply-To: <19b401c2850d$b95e28a0$6501a8c0@animal>

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



On Tue, 5 Nov 2002, Lasse Laursen wrote:

> Hi,
>
> Thanks for your reply. I have some additional questions:
>
> > Well the only rule for selecting the number of nfsiods and nfsd is the
> > maximum number of threads that are going to request an NFS operation on
> > the server. For example assume that your web server has a typical number
> > of httpd dameons of 50, that means that every httpd can access files on
> > the server, and in the worst case both 50 httpd will request
> > simultaneoulsy different NFS operations. This means that you should have
> > at least 50 NFSIOD (on the client+server) and 50 NFSD running (on the
> > server).
>
> A read operation (typical operation for all the clients) does not alter any
> data? So
> does every read request require a nfsd? Lets assume a worst case scenario
> where
> 50 http servers access 50 different files - would I need 50 NFS daemons to
> run
> on the server to obtain maximum performance then?

NFSD is not just a server for write requests but for read requests also,
as well as for all the NFS operations (like lookup, remove and other). So
in the worst case senario if u simulaneously access 50 different (so no
cache effect takes place) files on NFS, I think that at least 50 different
connections to NFSD processes will happen.

In real life though, the accesses are not thus simultaneously and they
have some small time difference, which means that u can reduce the number
of 50 to half of it, because all the requests are scheduled.

Even on a heavy loaded NFS server, it is not expected that the worst case
scenario will happen, because NFS operations on a fast switch network take
very little time. So start from the worst case and start removing NFSD and
NFSIOD as u see appropriate.





>
> > Remember that NFSIOD must run both on CLIENT and SERVER.
>
> (Taken from the man page pf nfsiod)
>
>      Nfsiod runs on an NFS client machine to service asynchronous I/O
> requests
>      to its server.  It improves performance but is not required for correct
>      operation.
>
> Why should I start the nfsiod daemon on the server?





Although the man page says this, I *think* that the communication is done
like this

CLIENT <=> NFSIOD(CLIENT) <=> NFSIOD (SERVER) <=> NFSD

which menas that NFSIOD 'speak' with each other and then they pass the
requests to NFS.

Of course if u dont need to have on the server too many NFSIOD. So in my
case I just have 8 nfsiod on server running and most of them are idle, and
besides, they only take 1.5MB of memory which I can afford. So I think
having *some* NFSIOD also on server is not a bad idea. Of course on the
server u should have a lot of NFSD.

in other words, running NFSIOD on server is not a bad idea..








Also monitor the mbufs on all your machines (especially the server).

do from time to time a 'netstat -m' and see the peak  value of mbuf
and mbuf clusters...if it is close to the max limit then you will suffer
from mbuff exhaustion will will eventually make the machine unreachable
from network.


u can change mbuff max value before kernel load ...see tuning (7)


Also if u have mbuf exhastion try to use smaller block size in NFS mounts.



Regards!


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?20021106114019.W69960-100000>