how to fix an interesting issue with mountd?

Rick Macklem rmacklem at uoguelph.ca
Tue Jun 2 02:15:56 UTC 2020


Updated slightly from the previous post...

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.
       The current code ignores sighup(s) posted while a reload is in progress,
       but could still suffer a similar fate if sighups are posted to mountd just
       after a reload completes, over and over..
       (I vaguely recall someone reporting that mountd spent hours just reloading
        exports repeatedly.)

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...
_______________________________________________
freebsd-net at freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"


More information about the freebsd-net mailing list