From owner-freebsd-questions Tue Nov 5 11:44:37 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 1882337B401 for ; Tue, 5 Nov 2002 11:44:35 -0800 (PST) Received: from mail.duth.gr (mail.duth.gr [192.108.114.110]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4EDC643E77 for ; Tue, 5 Nov 2002 11:44:31 -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 gA5JiMBJ039559 (version=TLSv1/SSLv3 cipher=EDH-DSS-DES-CBC3-SHA bits=168 verify=NO) for ; Tue, 5 Nov 2002 21:44:22 +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 gA5JiHJK030696 for ; Tue, 5 Nov 2002 21:44:17 +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 gA5JiGxf030693 for ; Tue, 5 Nov 2002 21:44:17 +0200 (EET) X-Authentication-Warning: bigb3server.bbcluster.gr: bigbrother owned process doing -bs Date: Tue, 5 Nov 2002 21:44:16 +0200 (EET) From: BigBrother X-X-Sender: bigbrother@bigb3server.bbcluster.gr To: questions@FreeBSD.ORG Subject: Re: NFS Performance woes In-Reply-To: Message-ID: <20021105212927.J69960-100000@bigb3server.bbcluster.gr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-6.3 required=10.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,SPAM_PHRASE_05_08, 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 >> 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] > >How is the optimum number of nfsd processes determined on the server? On >our current setup we have 4 nfs daemons running serving 3 clients >(webservers) > >Is the number of daemons to start determined by the number of clients or >the number of files that has to be transferred simultaniously? > >Same question goes for the number of nfsiod processes... 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). Remember that NFSIOD must run both on CLIENT and SERVER. So you determine what is the maximum number of NFS operations...for example in your client you dont have only 50 httpd running, but you make from time to time compile with the -j 4 (4 parallel compilation jobs), this means that you should increase the number of 50 by +4... also in your client you usually have some users that login and their home directories are on NFS mounted media...usually 10 people are using NFS mounted home, which means that in the worst case 10 people may request something from their home so you have to increase the number fo 54 by 10 more.... I know the handbook says taht 8 nfsiod/nfsd is a nice number but I think that is not correct. I have an ftp server that uses NFS mounted directories, and usually 15 people are connected...so I have put a 20 NFS processes running... Having too much NFSIOD is not bad...every NFSIOD eats just 220KB of memory (which means that you should also consider your memory-if you can afford to run a lot of nfsiod) Having too much NFSD also is not bad...every NFS eats just 356Kbyte of memory, which again you have to note it. So with simple words, just add all the things that you can imagine that can happen simultaneously on all the NFS mounted dirs and put that number...let it run for one week and note down how many NFSIOD are idle or NFSD.....If you have put 100 NFSIOD and you see that usually there are more than 50 NFSIOD idle (doing nothing) [on your ps axwu or TOP output] then its a safe bet to reduce the number... Of course you cannot optimize the NFS system in one day...it needs a lot of time to take measurements and check from time to time if you have enough NFSIOD or NFSD, because system load distribution tend may change and you may see that more or less NFS processes have to exist.. I hope I make it clear for you!! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message