From owner-freebsd-current@freebsd.org Tue Nov 28 15:41:38 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4378CDBA2DC; Tue, 28 Nov 2017 15:41:38 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 330BD69788; Tue, 28 Nov 2017 15:41:34 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id e27b0ab0; Tue, 28 Nov 2017 16:41:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=QTIfWcGWeCrF/MOyhkEvMjwA8/s=; b=bt9yCPrzgk0ZXmDXGfYRblqyrEpc Ra0hUg8knck229h8oeyfawdSliPMsXujvPanJzZUbjbY1TnV2wTnElX/JRVdgMiW aViELFAxi8BYEo//t5jev7ygLb3pevVRthWS11zstnYfILy7Nh4LrmzYX8GQYACq xi2VbVzQcm3WylQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=gStvohJrRckZG+Qfa3F5ux/8362dj2I53ZbsZGnDR3xcs3Ky7hr5f6hu 5uD0gMBxosZY6jU8nNmluCatVBBxmeVvH8eSnPbcKAqNdf5+Dif3XnrWed6yKP/p LCKu1JbIWeieIQALg2aSLulq2V1UiuV167g/kRf5BLtdQY3VlrQ= Received: from arcadia (evadot.gandi.net [217.70.181.36]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 602eac22 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Tue, 28 Nov 2017 16:41:32 +0100 (CET) Date: Tue, 28 Nov 2017 16:41:32 +0100 From: Emmanuel Vadot To: Rick Macklem Cc: Konstantin Belousov , FreeBSD Current , "freebsd-fs@freebsd.org" , Rick Macklem Subject: Re: Switch vfs.nfsd.issue_delegations to TUNABLE ? Message-Id: <20171128164132.290bf07218b16164db613242@bidouilliste.com> In-Reply-To: References: <20171128114136.10e44d5bcfd563e9b4ab5453@bidouilliste.com> <20171128110428.GN2272@kib.kiev.ua> <20171128142610.6ab535b0b8c6b5d372cd3f27@bidouilliste.com> <20171128134009.GQ2272@kib.kiev.ua> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2017 15:41:38 -0000 On Tue, 28 Nov 2017 14:12:38 +0000 Rick Macklem wrote: > Konstantin Belousov wrote: > >On Tue, Nov 28, 2017 at 02:26:10PM +0100, Emmanuel Vadot wrote: > >> On Tue, 28 Nov 2017 13:04:28 +0200 > >> Konstantin Belousov wrote: > >> > >> > On Tue, Nov 28, 2017 at 11:41:36AM +0100, Emmanuel Vadot wrote: > >> > > > >> > > Hello, > >> > > > >> > > I would like to switch the vfs.nfsd.issue_delegations sysctl to a > >> > > tunable. > Since it defaults to "disabled", I don't see why a tunable would be necessary? > (Just do nothing and delegations don't happen. If you want the server > to issue delegations, then use the sysctl to turn them on. If you want to turn > them off again at the server, reboot the server without setting the sysctl.) If you need to reboot to make things working again without delegation this shouldn't be a sysctl. > > > > The reason behind it is recent problem at work on some on our filer > > > > related to NFS. > > > > We use NFSv4 without delegation as we never been able to have good > > > > performance with FreeBSD server and Linux client (we need to do test > > > > again but that's for later). > Delegations are almost never useful, especially with Linux clients. Can you elaborate ? Reading what delegation are I see that this is exactly what I'm looking for to have better performance with NFS for my workload (I only have one client per mount point). > [stuff snipped] > > > Perhaps make nodeleg per-mount flag ? > The sysctl vfs.nfsd.issue_delegations only affects the server. > If you have a FreeBSD client that is mounting a delegations enabled server and > does not want delegations, just don't run the "nfscbd" daemon on the client. > The only time you want the "nfscbd" daemon running is for delegations and > pNFS layouts. (I suppose there is the case of a client using NFSv4.1/pNFS against > a server with delegations enabled, but since delegations aren't very useful, > I'd just disable delegations on the server for this case.) > > Having a per-mount version of this would be overkill, I think. It would have to > disable callbacks on the mount point, since there is no way for a client to say > "don't give me delegations" except disabling callbacks, which the server > requires for delegation issue. > [stuff snipped] > The case where there has never been delegations issued will result in an > empty delegation queue. Maybe this case can be handled without acquiring > the "global NFSv4 state lock", which is what sounds like is causing the > performance issue. Maybe a global counter of how many delegations are > issued that is handled by atomic ops. > --> If it is 0, nfsrv_checkgetattr() can just return without acquiring the lock. > > I'll take a look at this, rick > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" -- Emmanuel Vadot