Feature #25013
closedmds: add average session age (uptime) perf counter
0%
Description
Add a performance counter in the MDS to capture average age (uptime) of sessions. This should reflect the average uptime of ongoing and closed sessions (as a single perf stat). This was marked to be included in PR https://github.com/ceph/ceph/pull/22668 initially, but had to be carved out as a separate feature ticket due to pending discussions about the best method (in terms of correctness and efficiency) to calculate this stat.
Thoughts from earlier discussions:
You can add a public method to get the average session starttime: keep a running average of the starttimes (the co then divide by the number of sessions when computing the average. When adding a session:
avg_starttime = ((avg_starttime / (new_session_count)) * (new_session_count-1) + sesion_starttime/new_session_count
Removing is the reverse.
The tricky part is doing that with monotonic clock time points rather than unix epochs. @adamemerson, can you advise the right way to compute the average of a set of coarse_mono_time epochs? We need to be able to add/remove epochs from the set dynamically, using the math above ^
@batrick -- I think the average session age would need to be updated regularly (on each tick()) and not only on session add and remove. That way we would have the average uptime for ongoing sessions too which would be constantly refreshed (but is computationally expensive if there are huge number of sessions).
Updated by Venky Shankar almost 6 years ago
- Target version set to v14.0.0
- Source set to Development
Updated by Venky Shankar almost 6 years ago
- Related to Bug #24004: mds: curate priority of perf counters sent to mgr added
Updated by Patrick Donnelly almost 6 years ago
- Status changed from New to In Progress
- Assignee set to Venky Shankar
Updated by Venky Shankar over 5 years ago
- Status changed from In Progress to Fix Under Review
Updated by Venky Shankar over 5 years ago
- Related to Feature #35411: mds: store session birth time on-disk in session map added
Updated by Patrick Donnelly over 5 years ago
- Status changed from Fix Under Review to Pending Backport
Updated by Nathan Cutler over 5 years ago
- Copied to Backport #35937: luminous: mds: add average session age (uptime) perf counter added
Updated by Nathan Cutler over 5 years ago
- Copied to Backport #35938: mimic: mds: add average session age (uptime) perf counter added
Updated by Nathan Cutler over 5 years ago
- Status changed from Pending Backport to Resolved