Date: Sun, 8 Mar 2009 12:18:54 +0000 (GMT) From: Robert Watson <rwatson@FreeBSD.org> To: Yoshihiro Ota <ota@j.email.ne.jp> Cc: stable@freebsd.org Subject: Re: Where is nfsiod now? Message-ID: <alpine.BSF.2.00.0903081214230.1340@fledge.watson.org> In-Reply-To: <20090308044012.0a666ff6.ota@j.email.ne.jp> References: <20090308044012.0a666ff6.ota@j.email.ne.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 8 Mar 2009, Yoshihiro Ota wrote: > I thought rc used to start nfsiod if you set nfs_cilent_enable back years > ago. Now, on my 7.1-RELEASE machine, it sets up a couple of sysctls in > /etc/rc.d/nfsclient script but not nfsiod. > > Is nfsiod obsolete by now? > It is still on the system; does it still improve nfs performance? In the historic BSD kernel, kernel threads for services such as asynchronous NFS write-behind worker (which is what nfsiod is) were created via user processes that "donated" their thread context to the kernel by blocking in a syscall. In modern FreeBSD kernels, kernel threads can be created and destroyed arbitrarily within the kernel as required, so the size of the worker thread pool is controlled by sysctls -- by default there will be none unless required for an NFS mount, and then a pool will be maintained based on use with a limit. For example, on my box without NFS active, I see: robert@fledge:/usr/src/sbin/nfsiod> sysctl vfs.nfs | grep iod vfs.nfs.iodmax: 20 vfs.nfs.iodmin: 0 vfs.nfs.iodmaxidle: 120 We have a minimum of 0, a maximum of 20 workers, and idle workers are killed off after a timeout of 120 seconds. When using an NFS client with write-behind, you should see kernel threads named "nfsiod X" where X is the worker thread number. Take a look at src/sys/nfsclient/nfs_nfsiod.c for details. Robert N M Watson Computer Laboratory University of Cambridge
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0903081214230.1340>