Project

General

Profile

Feature #25013

mds: add average session age (uptime) perf counter

Added by Venky Shankar 5 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Administration/Usability
Target version:
Start date:
07/20/2018
Due date:
% Done:

0%

Source:
Development
Tags:
Backport:
mimic,luminous
Reviewed:
Affected Versions:
Component(FS):
MDS
Labels (FS):
task(medium)
Pull request ID:

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).


Related issues

Related to fs - Bug #24004: mds: curate priority of perf counters sent to mgr Resolved 05/03/2018
Related to fs - Bug #35411: mds: store session birth time on-disk in session map In Progress 09/03/2018
Copied to fs - Backport #35937: luminous: mds: add average session age (uptime) perf counter Resolved
Copied to fs - Backport #35938: mimic: mds: add average session age (uptime) perf counter Resolved

History

#1 Updated by Venky Shankar 5 months ago

  • Target version set to v14.0.0
  • Source set to Development

#2 Updated by Venky Shankar 5 months ago

  • Related to Bug #24004: mds: curate priority of perf counters sent to mgr added

#3 Updated by Patrick Donnelly 5 months ago

  • Status changed from New to In Progress
  • Assignee set to Venky Shankar

#4 Updated by Venky Shankar 5 months ago

  • Status changed from In Progress to Need Review

#5 Updated by Venky Shankar 3 months ago

  • Related to Bug #35411: mds: store session birth time on-disk in session map added

#6 Updated by Patrick Donnelly 3 months ago

  • Status changed from Need Review to Pending Backport

#7 Updated by Nathan Cutler 3 months ago

  • Copied to Backport #35937: luminous: mds: add average session age (uptime) perf counter added

#8 Updated by Nathan Cutler 3 months ago

  • Copied to Backport #35938: mimic: mds: add average session age (uptime) perf counter added

#9 Updated by Nathan Cutler about 1 month ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF