From owner-freebsd-fs@FreeBSD.ORG Tue Jan 8 15:43:24 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0EDD11C6 for ; Tue, 8 Jan 2013 15:43:24 +0000 (UTC) (envelope-from jas@cse.yorku.ca) Received: from bronze.cs.yorku.ca (bronze.cs.yorku.ca [130.63.95.34]) by mx1.freebsd.org (Postfix) with ESMTP id C9A74958 for ; Tue, 8 Jan 2013 15:43:23 +0000 (UTC) Received: from [130.63.97.125] (ident=jas) by bronze.cs.yorku.ca with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76) (envelope-from ) id 1Tsb0K-0005IW-N9; Tue, 08 Jan 2013 10:22:16 -0500 Message-ID: <50EC39A8.3070108@cse.yorku.ca> Date: Tue, 08 Jan 2013 10:22:16 -0500 From: Jason Keltz User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Andrey Simonenko Subject: Re: Problems Re-Starting mountd References: <20130103123730.GA19137@pm513-1.comsys.ntu-kpi.kiev.ua> <20130108150508.GA2248@pm513-1.comsys.ntu-kpi.kiev.ua> In-Reply-To: <20130108150508.GA2248@pm513-1.comsys.ntu-kpi.kiev.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 X-Spam-Level: - X-Spam-Report: Content preview: On 01/08/2013 10:05 AM, Andrey Simonenko wrote: > I created 2000 file systems on ZFS file system backed by vnode md(4) > device. The /etc/exports file contains 4000 entries like your example. > > On 9.1-STABLE mountd spends ~70 seconds in flushing current NFS exports > in the NFS server, parsing data from /etc/exports and loading parsed > data into the NFS server. ~70 seconds is not several minutes. Most of > time mountd spends in nmount() system call in "zio->io_cv" lock. > > Can you show the output of "truss -fc -o /tmp/output.txt mountd" > (wait wchan "select" state of mountd and terminate it by a signal). > If everything is correct you should see N statfs() calls, N+M nmount() > calls and something*N lstat() calls, where N is the number of /etc/exports > lines, M is the number of mounted file systems. Number of lstat() calls > depends on number of components in pathnames. [...] Content analysis details: (-1.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SHORTCIRCUIT Not all rules were run, due to a shortcircuited rule -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP Cc: FreeBSD Filesystems X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2013 15:43:24 -0000 On 01/08/2013 10:05 AM, Andrey Simonenko wrote: > I created 2000 file systems on ZFS file system backed by vnode md(4) > device. The /etc/exports file contains 4000 entries like your example. > > On 9.1-STABLE mountd spends ~70 seconds in flushing current NFS exports > in the NFS server, parsing data from /etc/exports and loading parsed > data into the NFS server. ~70 seconds is not several minutes. Most of > time mountd spends in nmount() system call in "zio->io_cv" lock. > > Can you show the output of "truss -fc -o /tmp/output.txt mountd" > (wait wchan "select" state of mountd and terminate it by a signal). > If everything is correct you should see N statfs() calls, N+M nmount() > calls and something*N lstat() calls, where N is the number of /etc/exports > lines, M is the number of mounted file systems. Number of lstat() calls > depends on number of components in pathnames. Andrey, Would that still be an ~70 second period in which new mounts would not be allowed? In the system I'm preparing, I'll have at least 4000 entries in /etc/exports, probably even more, so I know I'll be dealing with the same issue that Tim is dealing with when I get there. However, I don't see how to avoid the issue ... If I want new users to be able to login shortly after their account is created, and each user has a ZFS filesystem as a home directory, then at least at some interval, after adding a user to the system, I need to update the exports file on the file server, and re-export everything. Yet, even a >1 minute delay where users who are logging in won't get their home directory mounted on the system they are logging into - well, that's not so good... accounts can be added all the time and this would create random chaos. Isn't there some way to make it so that when you re-export everything, the existing exports are still served until the new exports are ready? Would this be the same for NFSv3 versus NFSv4? I suspect yes. Jason.