Project

General

Profile

Actions

Feature #25013

closed

mds: add average session age (uptime) perf counter

Added by Venky Shankar almost 6 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Administration/Usability
Target version:
% 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 4 (1 open3 closed)

Related to CephFS - Bug #24004: mds: curate priority of perf counters sent to mgrResolvedVenky Shankar05/03/2018

Actions
Related to CephFS - Feature #35411: mds: store session birth time on-disk in session mapIn ProgressVenky Shankar

Actions
Copied to CephFS - Backport #35937: luminous: mds: add average session age (uptime) perf counterResolvedVenky ShankarActions
Copied to CephFS - Backport #35938: mimic: mds: add average session age (uptime) perf counterResolvedVenky ShankarActions
Actions #1

Updated by Venky Shankar almost 6 years ago

  • Target version set to v14.0.0
  • Source set to Development
Actions #2

Updated by Venky Shankar almost 6 years ago

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

Updated by Patrick Donnelly almost 6 years ago

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

Updated by Venky Shankar over 5 years ago

  • Status changed from In Progress to Fix Under Review
Actions #5

Updated by Venky Shankar over 5 years ago

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

Updated by Patrick Donnelly over 5 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #7

Updated by Nathan Cutler over 5 years ago

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

Updated by Nathan Cutler over 5 years ago

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

Updated by Nathan Cutler over 5 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF