From owner-freebsd-fs@FreeBSD.ORG Thu Jan 3 02:39:36 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D328B44F for ; Thu, 3 Jan 2013 02:39:36 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 7C680F53 for ; Thu, 3 Jan 2013 02:39:36 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqIEAHHu5FCDaFvO/2dsb2JhbABCAw4IgWmEO7cjc4IeAQEBBAEBASArIAsbDgoCAg0ZAikBCSYGCAcEARwEh3IMqCWPMIEii1B6ghuBEwOIYop8gi6BHI8sgjZcgUoJFwMb X-IronPort-AV: E=Sophos;i="4.84,400,1355115600"; d="scan'208";a="8792545" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 02 Jan 2013 21:39:35 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 04CE1B4023; Wed, 2 Jan 2013 21:39:35 -0500 (EST) Date: Wed, 2 Jan 2013 21:39:34 -0500 (EST) From: Rick Macklem To: Tim Gustafson Message-ID: <678069379.1639029.1357180774958.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: Subject: Re: Problems Re-Starting mountd MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Win)/6.0.10_GA_2692) 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: Thu, 03 Jan 2013 02:39:36 -0000 Tim Gustafson wrote: > Hi, > > Our /etc/exports file contains two lines for each user (one export for > network "A", and one network for export "B"), and is about 3,200 line > long. > > Re-starting mountd takes several minutes: > > /etc/rc.d/mountd restart > > Re-loading mountd returns immediately, but new mounts are blocked for > the same duration of time, at least several minutes. > Wow, I wouldn't have expected several minutes. Reloading the exports isn't a lightweight activity, but it doesn't do that much work. All I can think of is that the syscall doing the exports is getting stuck waiting for mnt_explock, which is needs to hold exclusively, while every RPC grabs it as a shared lock. You could try this patch, that went into head and stable/9 recently. http://people.freebsd.org/~rmacklem/atomic-export.patch It adds a new option to mountd that suspends execution of the nfsd threads while it is reloading the exports. The object was to avoid clients from getting transient access errors, but in this case it might allow the reload to happen a lot more quickly. (If it still takes minutes when this patch/option is used, I have no idea why it would take so long.) Alternately, switching from mountd to nfse might be worth considering. Good luck with it, rick > /etc/rc.d/mountd reload > > Is there any way to speed up reloading the mountd configuration? It's > so slow that we basically can't add exports during the day because the > reload takes so long that some users get failed mounts when they log > in during a reload. > > -- > > Tim Gustafson > tjg@soe.ucsc.edu > 831-459-5354 > Baskin Engineering, Room 313A > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"