mgr/DaemonServer: auto-tune stats period when message queue gets backed up
The mgr can get overwhelmed when there's a lot of cluster activity and
daemons are sending stats reports faster than we can process them.
This commit adds logic to monitor the messenger queue depth and bump
up mgr_stats_period when things get congested. This reduces the
frequency of daemon stat reports, allowing the mgr to process existing
reports without being overwhelmed by new ones. The period automatically
scales back down when the queue clears up.
Added mgr_stats_period_autotune (on by default) and a queue threshold
setting. Recovery happens automatically when the queue clears up.
Max period is capped at 60 seconds to prevent excessive stat delays.
Fixes: https://tracker.ceph.com/issues/73151
Signed-off-by: Nitzan Mordechai <nmordech@ibm.com>
(cherry picked from commit
027a609a8274b932e55e3aa529f33217de31a15b)
Conflicts:
- PendingReleaseNotes
tentacle has different release note entries than main; kept
tentacle's existing entries and added only the MGR stats period
auto-tuning note from this commit