Skip to content

os/bluestore: don't sample transactions when tracing is off - #72807

Merged
mheler merged 1 commit into
ceph:mainfrom
mheler:wip-bluestore-skip-idle-txc-trace
Nov 3, 2026
Merged

mheler merged 1 commit into
ceph:mainfrom
mheler:wip-bluestore-skip-idle-txc-trace

Conversation

@mheler

@mheler mheler commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

BlueStore samples every transaction at the default trace rate, including eight RocksDB property reads, even when tracing is off. This skips sampling when transaction tracepoints are disabled and only fetches the properties when their tracepoint is enabled.

Testing with one OSD (optane), libaio, and cache-disabled 4 KiB random RBD writes showed:

Queue depth Write IOPS Mean write latency OSD + client CPU/write
32 +1.22% -1.21% -2.84%
64 +1.42% -1.47% -2.93%
128 +0.86% -0.88% -2.78%

Benchmark command, with local paths omitted. QD64 is shown; the other runs used --io-threads 32 and --io-threads 128:

rbd --rbd-cache=false bench perf/write-fresh-20261017/overwrite \
  --io-type write \
  --io-size 4K \
  --io-threads 64 \
  --io-total 1T \
  --io-pattern rand \
  --pattern-byte rand-str

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.

bluestore_throttle_trace_rate defaults to 0, which samples every
transaction and reads eight RocksDB properties even when no LTTng
tracepoints are enabled.

skip sampling and completion counting while transaction tracepoints are
disabled. only read RocksDB properties when their tracepoint is enabled,
and initialize the values to zero in case a property read fails.

keep the existing sampling behavior for WITH_EVENTTRACE builds, where
OID_ELAPSED depends on txc.tracing.

Signed-off-by: Matthew N Heler <[email protected]>
@mheler
mheler marked this pull request as ready for review October 18, 2026 18:25
@mheler
mheler requested a review from a team as a code owner October 18, 2026 18:25
@mheler
mheler requested a review from tchaikov October 18, 2026 18:26

@markhpc markhpc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

oof, yeah, we shouldn't be tracing when it's not enabled. LGTM

@tchaikov

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

@tchaikov

Copy link
Copy Markdown
Contributor

jenkins test make check

@tchaikov tchaikov left a comment

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.

lgtm

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath10-testing-20261027.070130-main.

@NitzanMordhai

Copy link
Copy Markdown
Contributor

@mheler
mheler merged commit 4cfc9db into ceph:main Nov 3, 2026
25 of 30 checks passed
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.

5 participants