Skip to content

os/bluestore: add performance counters for the ObjectStore interface - #69890

Merged
ifed01 merged 4 commits into
ceph:mainfrom
emilytl:wip-77226-objectstore-perfcounters
Sep 29, 2026
Merged

ifed01 merged 4 commits into
ceph:mainfrom
emilytl:wip-77226-objectstore-perfcounters

Conversation

@emilytl

@emilytl emilytl commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

Most BlueStore ObjectStore interface methods already report latency through performance counters, but several operations were not measured. This change adds latency counters for the remaining read-side methods and write-side transaction handlers. Instrumentation is placed at the handler level rather than shared _do* helpers to avoid double-counting, and functions with multiple exit paths (stat, _fiemap) log latency at each return. collection_empty intentionally has no counter of its own, as it delegates to the already-measured collection_list.

Counter names use 4-char mnemonics (exst, stat, gatr, fmap, omgt, coll, tuch, zero, clon, attr, omst, rnam, othw) for readability in perf dump output.

Verified with unit test StoreTest.InterfacePerfCounters which confirms all counters increment at expected call counts and measures realistic latencies on a fresh store.

Fixes: https://tracker.ceph.com/issues/77226
Signed-off-by: Emily Leson [email protected]

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@emilytl
emilytl requested a review from a team as a code owner July 1, 2026 21:15
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

16 similar comments
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@emilytl
emilytl marked this pull request as draft July 1, 2026 21:18
@emilytl
emilytl marked this pull request as ready for review July 1, 2026 21:26
Comment thread src/os/bluestore/BlueStore.cc Resolved
Comment thread src/os/bluestore/BlueStore.cc Resolved
@github-actions github-actions Bot added the tests label Jul 6, 2026
@aclamk

aclamk commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Example stats taken from longer testing run:

  "exists_lat": {
    "avgcount": 2,
    "sum": 0.000004780,
    "max_inc": 0.000002440,
    "avgtime": 0.000002390
  },
  "stat_lat": {
    "avgcount": 0,
    "sum": 0E-9,
    "avgtime": 0E-9
  },
  "getattr_lat": {
    "avgcount": 39944884,
    "sum": 129.173587281,
    "max_inc": 0.033858025,
    "avgtime": 0.000003233
  },
  "fiemap_lat": {
    "avgcount": 0,
    "sum": 0E-9,
    "avgtime": 0E-9
  },
  "omap_get_lat": {
    "avgcount": 0,
    "sum": 0E-9,
    "avgtime": 0E-9
  },
  "clone_lat": {
    "avgcount": 77593632,
    "sum": 1708.191839805,
    "max_inc": 0.063136062,
    "avgtime": 0.000022014
  },
  "attr_lat": {
    "avgcount": 86393526,
    "sum": 252.400585265,
    "max_inc": 0.052987720,
    "avgtime": 0.000002921
  },
  "touch_lat": {
    "avgcount": 79461179,
    "sum": 17.323339580,
    "max_inc": 0.003323423,
    "avgtime": 2.18E-7
  },
  "zero_lat": {
    "avgcount": 0,
    "sum": 0E-9,
    "avgtime": 0E-9
  },
  "omap_set_lat": {
    "avgcount": 144853475,
    "sum": 656.912678125,
    "max_inc": 0.064993838,
    "avgtime": 0.000004535
  },
  "rename_lat": {
    "avgcount": 0,
    "sum": 0E-9,
    "avgtime": 0E-9
  },
  "collection_lat": {
    "avgcount": 3,
    "sum": 2.69E-7,
    "max_inc": 1.29E-7,
    "avgtime": 8.9E-8
  },
  "other_write_lat": {
    "avgcount": 2655532,
    "sum": 0.116438853,
    "max_inc": 0.001423799,
    "avgtime": 4.3E-8
  },

Some were not really used, but some were frequently used. As expected.

Comment thread src/os/bluestore/BlueStore.cc Resolved
Comment thread src/test/objectstore/store_test.cc Resolved
double avg_us = after ? (double)sum_ns(idx) / after / 1000.0 : 0.0;
std::cout << " " << name << ": +" << (after - before)
<< " (expected +" << want << "), avg " << avg_us << " us\n";
EXPECT_EQ(before + want, after) << name;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fact that EXPECT_* macros are returning ostringstream was a surprise to me.
Regardless << name does not print anything useful. As I get it now, it was intended to provide explanation of what is broken.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, the << name is only used if the assertion fails. It gets appended to the failure message so it's easy to see which check failed. The std::cout already prints the per-check summary on every run. I can remove it if you'd prefer to keep the test a bit cleaner.

Comment thread src/test/objectstore/store_test.cc Resolved
@emilytl
emilytl force-pushed the wip-77226-objectstore-perfcounters branch from 6d6226d to 54ff681 Compare July 8, 2026 23:07
@pdvian

pdvian commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

ok to test

@vumrao

vumrao commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

cc @vumrao

@vumrao

vumrao commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

@SrinivasaBharath - does this one need your attention for test?

@Jayaprakash-ibm

Copy link
Copy Markdown
Contributor

@timqn22

timqn22 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

ok to test

@ifed01

ifed01 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

jenkins test make check

@ifed01

ifed01 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

@ifed01

ifed01 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

jenkins test api

Comment thread src/os/bluestore/BlueStore.cc Resolved
Comment thread src/os/bluestore/BlueStore.cc Resolved
Comment thread src/os/bluestore/BlueStore.cc Resolved
@markhpc

markhpc commented Aug 27, 2026

Copy link
Copy Markdown
Member

Are we ready to merge this one?

@emilytl
emilytl force-pushed the wip-77226-objectstore-perfcounters branch from 604ef06 to 670a8f5 Compare September 5, 2026 23:05
@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath29-testing-20260924.231744-main.

@NitzanMordhai

Copy link
Copy Markdown
Contributor

@ifed01
ifed01 merged commit 43849ec into ceph:main Sep 29, 2026
15 checks passed
@github-actions

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I have resolved the following tracker ticket due to the merge of this PR:

No backports are pending for the ticket. If this is incorrect, please update the tracker
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/36580091993

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.