how to fix an interesting issue with mountd?

Rodney W. Grimes freebsd-rwg at gndrsh.dnsmgr.net
Tue Jun 2 03:09:40 UTC 2020


> 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 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"
> 

-- 
Rod Grimes                                                 rgrimes at freebsd.org


More information about the freebsd-net mailing list