Skip to content

qa/rados: reduce osd dispatch delay injection probability to 1% - #72502

Merged
aainscow merged 1 commit into
ceph:mainfrom
aainscow:wip-aainscow-dispatch-delay-1pct
Nov 5, 2026
Merged

aainscow merged 1 commit into
ceph:mainfrom
aainscow:wip-aainscow-dispatch-delay-1pct

Conversation

@aainscow

@aainscow aainscow commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

msgr-failures/osd-dispatch-delay sets osd_debug_inject_dispatch_delay_probability to 0.1 with a 0.1 s duration. As well as ms_fast_dispatch, the delay is injected twice per item in ShardedOpWQ::_process() (OSD.cc, before and after pg->lock()), so every op queue item pays an expected 20 ms sleep. That includes client ops, sub-op replies, peering events and NullEvts.

The compression objectstore facets limit OSDs to 1 shard × 2 threads (https://tracker.ceph.com/issues/72879). Combined with the injection, that caps each OSD at about 95 queue items/s.

What goes wrong

pggrow thrashing on wide EC pools pushes arrivals past that cap:

  • every map epoch queues a NullEvt to each of the 80–170 PGs on an OSD, and the thrasher toggles noscrub/nodeep-scrub about every 2 s, each toggle being an epoch;
  • pool splits add bursts of notifies.

Peering events are served strictly ahead of client work (WPQ strict queue, mClock immediate class), so the backlog never drains. Client ops and EC sub-read replies then starve for more than 10 minutes.

Evidence from the debug-20 logs of two failures in one QA batch:

  • Runs: skanta-2026-10-03_10:12:06-rados-wip-bharath19-testing-20261002.123021-main-distro-default-trial/604392 (read, WPQ) and …/603575 (write, mClock).
  • Throughput: about 95 items/s, all of it peering class, for 11–13 minutes, with no client items dequeued in that window.
  • Backlog: peaked at 6,000–6,700 items, about a minute of queue wait per item.
  • Worker time: 99.6% in the injected sleep, with about 0.05 ms of real work per item.
  • Model check: a fixed-capacity model fed only with the measured arrivals reproduces the measured backlog to within about 5%.

History

Before rados_osd_op_timeout was set (#71861), this showed up as wait_for_recovery timeouts (https://tracker.ceph.com/issues/75216). Across all k=10 m=4 thrash-erasure-code jobs on trial200 from January to October 2026:

dispatch-delay compression=yes jobs wait_for_recovery failures
no no 60 0%
no yes 61 3%
yes no 72 0%
yes yes 159 49%

With the client timeout it now shows up as ceph_test_rados -ETIMEDOUT (https://tracker.ceph.com/issues/81135).

This change

Lower the probability to 0.01. Replaying the measured arrivals from both runs against the capacity implied by 1% gives:

  • about 580–720 items/s of capacity;
  • 24–35% utilisation at the worst 10 s burst;
  • no backlog.

The perturbation still happens, at roughly 2 sleeps/s per OSD at 100 items/s. This file also feeds rados/thrash and the other thrash-erasure-code* suites through their msgr-failures symlinks.

Fixes: https://tracker.ceph.com/issues/81629

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.

🤖 Generated with Claude Code

@aainscow
aainscow requested a review from a team as a code owner October 8, 2026 15:28
@aainscow
aainscow force-pushed the wip-aainscow-dispatch-delay-1pct branch from 2afa976 to 7cc29ab Compare October 8, 2026 15:33
@aainscow
aainscow requested a review from bill-scales October 8, 2026 15:34
@ronen-fr

ronen-fr commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Makes sense (I have been encountering this in some runs. Pretty easy to see the cluster is not up to handling that high level of interruption)

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

Agree

msgr-failures/osd-dispatch-delay sets osd_debug_inject_dispatch_delay
probability 0.1, duration 0.1s. Besides ms_fast_dispatch, the delay is
injected twice per item in ShardedOpWQ::_process(), so every op queue
item (client op, sub-op reply, peering event, NullEvt) has an expected
20ms sleep. The compression objectstore facets limit OSDs to 1 shard x 2
threads (tracker 72879), which caps each OSD at ~95 queue items/s.

pggrow thrashing on wide EC pools exceeds that: every map epoch (the
thrasher toggles noscrub/nodeep-scrub every ~2s) queues a NullEvt to each
of 80-170 PGs per OSD, and pool splits add notify bursts. The strict
peering queue then never drains, and client ops (and EC sub-read replies)
starve for 10+ minutes. Timing from debug-20 logs showed 99.6% of worker
time in the injected sleep and ~0.05ms of real work per item.

Before rados_osd_op_timeout was set this surfaced as wait_for_recovery
timeouts: across Jan-Oct 2026 k=10 m=4 thrash-erasure-code jobs, 49% of
those combining dispatch-delay with compression failed that way, against
0-3% with either facet alone. With the client timeout it now surfaces as
ceph_test_rados -ETIMEDOUT (tracker 81135).

Replaying the measured arrivals from two failing runs against the
capacity implied by 1% gives ~580-720 items/s, 24-35% utilisation at the
worst 10s burst, and no backlog.

Fixes: https://tracker.ceph.com/issues/81629
Signed-off-by: Alex Ainscow <[email protected]>
Assisted-by: Claude Opus 5.5 <[email protected]>
@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath7-testing-20261012.100201-main.

@Jayaprakash-ibm

Copy link
Copy Markdown
Contributor

@aainscow
aainscow merged commit 1cfa9f8 into ceph:main Nov 5, 2026
19 of 20 checks passed
@github-actions

github-actions Bot commented Nov 5, 2026

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/42011259219

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