how to fix an interesting issue with mountd?
Rick Macklem
rmacklem at uoguelph.ca
Tue Jun 2 02:10:30 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...
More information about the freebsd-net
mailing list