Skip to content

os/bluestore: add latency and hit/miss counters for BlueStore caches - #70536

Merged
ifed01 merged 7 commits into
ceph:mainfrom
kumaraaryan511:cachecounter
Sep 28, 2026
Merged

ifed01 merged 7 commits into
ceph:mainfrom
kumaraaryan511:cachecounter

Conversation

@kumaraaryan511

@kumaraaryan511 kumaraaryan511 commented Jul 24, 2026 •

Copy link
Copy Markdown

This introduces performance counters to observe the cost of a cache miss (M), frequency of accessing the cache (F), and cache hit ratio (R) across BlueStore's data buffer and onode caches. It explicitly accounts for onode sharding overhead in miss latency measurements.
Also supports short term tracking by recording the stats whenever the bluestore cache stats admin socket is run and comparing them to previously recorded stats.

This serves as a prelude for calculating cache performance boosts to optimize the Priority Cache Manager memory distribution.

Fixes: http://tracker.ceph.com/issues/77219
Signed-off-by: Aaryan Kumar [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.

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

@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

This introduces performance counters to observe the cost of a cache miss (M),
frequency of accessing the cache (F), and cache hit ratio (R) across
BlueStore's data buffer and onode caches. It explicitly accounts for
onode sharding overhead in miss latency measurements.

This serves as a prelude for calculating cache performance boosts
to optimize the Priority Cache Manager memory distribution.

Fixes: http://tracker.ceph.com/issues/77219
Signed-off-by: Aaryan Kumar <[email protected]>
@kumaraaryan511
kumaraaryan511 force-pushed the cachecounter branch 3 times, most recently from 2fcfad2 to 62a5722 Compare July 27, 2026 04:24
@pdvian pdvian changed the title os/bluestore: add latency and hit/miss counters for BlueStore caches [DNM] os/bluestore: add latency and hit/miss counters for BlueStore caches Jul 27, 2026
@pdvian

pdvian commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

ok to test

Comment thread src/os/bluestore/BlueAdmin.cc Resolved
Comment thread src/os/bluestore/BlueStore.cc Resolved
Comment thread src/os/bluestore/BlueStore.cc Resolved
Comment thread src/os/bluestore/BlueStore.cc Resolved
Comment thread src/os/bluestore/BlueStore.h Resolved
@ifed01

ifed01 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Looks like the last push reverted the changes, is this expected?

@kumaraaryan511

Copy link
Copy Markdown
Author

Just wanted to make one more change, please give me a few more minutes

@ifed01

ifed01 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

jenkins test make check

@ifed01 ifed01 changed the title [DNM] os/bluestore: add latency and hit/miss counters for BlueStore caches os/bluestore: add latency and hit/miss counters for BlueStore caches Sep 15, 2026
@vumrao

vumrao commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Thanks, Igor and Bluestore team all the help here!

@kumaraaryan511

Copy link
Copy Markdown
Author

Hi Igor, thanks so much for reviewing and approving my PR. I really appreciate all your support and guidance!

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath22-testing-20260917.055008-main.

@connorfawcett

Copy link
Copy Markdown
Contributor

@ifed01
ifed01 merged commit c61c0e5 into ceph:main Sep 28, 2026
19 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/36432227786

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.

10 participants