Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jun 2020 02:15:53 +0000
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Cc:        Mark Johnston <markj@FreeBSD.org>, "patrykkotlowski@gmail.com" <patrykkotlowski@gmail.com>
Subject:   Re: how to fix an interesting issue with mountd?
Message-ID:  <QB1PR01MB3649C18C37D08A6324AEC81CDD8B0@QB1PR01MB3649.CANPRD01.PROD.OUTLOOK.COM>
In-Reply-To: <QB1PR01MB3649A8589A742A5BD5CB9AE7DD8B0@QB1PR01MB3649.CANPRD01.PROD.OUTLOOK.COM>
References:  <QB1PR01MB3649A8589A742A5BD5CB9AE7DD8B0@QB1PR01MB3649.CANPRD01.PROD.OUTLOOK.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
Updated slightly from the previous post...=0A=
=0A=
Hi,=0A=
=0A=
I'm posting this one to freebsd-net@ since it seems vaguely similar=0A=
to a network congestion problem and thought that network types=0A=
might have some ideas w.r.t. fixing it?=0A=
=0A=
PR#246597 - Reports a problem (which if I understand it is) where a sighup=
=0A=
   is posted to mountd and then another sighup is posted to mountd while=0A=
   it is reloading exports and the exports are not reloaded again.=0A=
   --> The simple patch in the PR fixes the above problem, but I think will=
=0A=
          aggravate another one.=0A=
For some NFS servers, it can take minutes to reload the exports file(s).=0A=
(I believe Peter Erriksonn has a server with 80000+ file systems exported.)=
=0A=
r348590 reduced the time taken, but it is still minutes, if I recall correc=
tly.=0A=
--> If you apply the patch in the PR and sighups are posted to mountd as=0A=
       often as it takes to reload the exports file(s), it will simply relo=
ad the=0A=
       exports file(s) over and over and over again, instead of processing=
=0A=
       Mount RPC requests.=0A=
       The current code ignores sighup(s) posted while a reload is in progr=
ess,=0A=
       but could still suffer a similar fate if sighups are posted to mount=
d just=0A=
       after a reload completes, over and over..=0A=
       (I vaguely recall someone reporting that mountd spent hours just rel=
oading=0A=
        exports repeatedly.)=0A=
=0A=
So, finally to the interesting part...=0A=
- It seems that the code needs to be changed so that it won't "forget"=0A=
  sighup(s) posted to it, but it should not reload the exports file(s) too=
=0A=
  frequently.=0A=
--> My thoughts are something like:=0A=
  - Note that sighup(s) were posted while reloading the exports file(s) and=
=0A=
    do the reload again, after some minimum delay.=0A=
    --> The minimum delay might only need to be 1second to allow some=0A=
           RPCs to be processed before reload happens again.=0A=
     Or=0A=
    --> The minimum delay could be some fraction of how long a reload takes=
.=0A=
          (The code could time the reload and use that to calculate how lon=
g to=0A=
           delay before doing the reload again.)=0A=
=0A=
Any ideas or suggestions? rick=0A=
ps: I've actually known about this for some time, but since I didn't have a=
 good=0A=
     solution...=0A=
_______________________________________________=0A=
freebsd-net@freebsd.org mailing list=0A=
https://lists.freebsd.org/mailman/listinfo/freebsd-net=0A=
To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"=0A=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?QB1PR01MB3649C18C37D08A6324AEC81CDD8B0>