From owner-freebsd-net@freebsd.org Tue Jun 2 03:09:40 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D29422FF5BB for ; Tue, 2 Jun 2020 03:09:40 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49bcTb6X9Jz4ZSD; Tue, 2 Jun 2020 03:09:39 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 05239cXt015194; Mon, 1 Jun 2020 20:09:38 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 05239bpL015193; Mon, 1 Jun 2020 20:09:37 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <202006020309.05239bpL015193@gndrsh.dnsmgr.net> Subject: Re: how to fix an interesting issue with mountd? In-Reply-To: To: Rick Macklem Date: Mon, 1 Jun 2020 20:09:37 -0700 (PDT) CC: "freebsd-net@freebsd.org" , Mark Johnston , "patrykkotlowski@gmail.com" X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 49bcTb6X9Jz4ZSD X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd-rwg@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd-rwg@gndrsh.dnsmgr.net X-Spamd-Result: default: False [1.42 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.40)[-0.404]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; MIME_GOOD(-0.10)[text/plain]; SUBJECT_ENDS_QUESTION(1.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.44)[-0.441]; NEURAL_SPAM_LONG(0.36)[0.361]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jun 2020 03:09:40 -0000 > Hi, > > I'm posting this one to freebsd-net@ since it seems vaguely similar > to a network congestion problem and thought that network types > might have some ideas w.r.t. fixing it? > > PR#246597 - Reports a problem (which if I understand it is) where a sighup > is posted to mountd and then another sighup is posted to mountd while > it is reloading exports and the exports are not reloaded again. > --> The simple patch in the PR fixes the above problem, but I think will > aggravate another one. > For some NFS servers, it can take minutes to reload the exports file(s). > (I believe Peter Erriksonn has a server with 80000+ file systems exported.) > r348590 reduced the time taken, but it is still minutes, if I recall correctly. > --> If you apply the patch in the PR and sighups are posted to mountd as > often as it takes to reload the exports file(s), it will simply reload the > exports file(s) over and over and over again, instead of processing > Mount RPC requests. > > So, finally to the interesting part... > - It seems that the code needs to be changed so that it won't "forget" > sighup(s) posted to it, but it should not reload the exports file(s) too > frequently. > --> My thoughts are something like: > - Note that sighup(s) were posted while reloading the exports file(s) and > do the reload again, after some minimum delay. > --> The minimum delay might only need to be 1second to allow some > RPCs to be processed before reload happens again. > Or > --> The minimum delay could be some fraction of how long a reload takes. > (The code could time the reload and use that to calculate how long to > delay before doing the reload again.) > > Any ideas or suggestions? rick > ps: I've actually known about this for some time, but since I didn't have a good > solution... Build a system that allows adding and removing entries from the in mountd exports data so that you do not have to do a full reload every time one is added or removed? Build a system that used 2 exports tables, the active one, and the one that was being loaded, so that you can process RPC's and reloads at the same time. > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > -- Rod Grimes rgrimes@freebsd.org