node-feature-discovery icon indicating copy to clipboard operation
node-feature-discovery copied to clipboard

Improve "core.sleepInterval" handling

Open eero-t opened this issue 3 years ago • 0 comments

Why is this needed:

Currently the time interval NFD takes between feature checking / labeling could differ significantly from the interval specified by the user, because it's used as an extra delay between activity, not an interval between them. If some hook takes 50% of the interval time, the reporting interval is >= 150% of the specified interval value.

What would you like to be added:

NFD implements interval option as an actual interval.

Optionally it could also:

  • When feature discovery phase exceeds the interval, disable feature/hook taking most time + log error about that, as it's something that cannot be supported within specified interval
  • When feature discovery exceeds e.g. 50% of the interval, log a warning (because on more loaded, more complex, or less beefy system interval could be exceed). Warning should include the used interval, and what discovery features are used, including listing each called hook, as those could differ between nodes (see: #857)

eero-t avatar Sep 22 '22 09:09 eero-t