From owner-freebsd-questions Wed Nov 6 1:53: 3 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0BCAD37B401 for ; Wed, 6 Nov 2002 01:53:00 -0800 (PST) Received: from mail.duth.gr (mail.duth.gr [192.108.114.110]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA6CF43E6E for ; Wed, 6 Nov 2002 01:52:58 -0800 (PST) (envelope-from bigbrother@bonbon.net) Received: from bigb3server.bbcluster.gr (b9-149.xan.duth.gr [193.92.211.149]) by mail.duth.gr (8.12.6/8.12.6) with ESMTP id gA69qoBJ085781 (version=TLSv1/SSLv3 cipher=EDH-DSS-DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 6 Nov 2002 11:52:52 +0200 (EET) (envelope-from bigbrother@bonbon.net) Received: from bigb3server.bbcluster.gr (localhost.bbcluster.gr [127.0.0.1]) by bigb3server.bbcluster.gr (8.12.3/8.12.3) with ESMTP id gA69qjJK087685 for ; Wed, 6 Nov 2002 11:52:45 +0200 (EET) (envelope-from bigbrother@bonbon.net) Received: from localhost (bigbrother@localhost) by bigb3server.bbcluster.gr (8.12.3/8.12.3/Submit) with ESMTP id gA69qhjH087682 for ; Wed, 6 Nov 2002 11:52:45 +0200 (EET) X-Authentication-Warning: bigb3server.bbcluster.gr: bigbrother owned process doing -bs Date: Wed, 6 Nov 2002 11:52:42 +0200 (EET) From: BigBrother X-X-Sender: bigbrother@bigb3server.bbcluster.gr To: questions@FreeBSD.ORG Subject: Re: NFS Performance woes In-Reply-To: <19b401c2850d$b95e28a0$6501a8c0@animal> Message-ID: <20021106114019.W69960-100000@bigb3server.bbcluster.gr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-7.4 required=10.0 tests=IN_REP_TO,LINES_OF_YELLING,QUOTED_EMAIL_TEXT, SPAM_PHRASE_02_03,X_AUTH_WARNING version=2.41 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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