Skip to content

common/options: clarify osd_max_backfills vs osd_recovery_max_active - #71706

Merged
anthonyeleven merged 1 commit into
ceph:mainfrom
anthonyeleven:adatri/osd-backfill-recovery-desc-clarify
Oct 26, 2026
Merged

anthonyeleven merged 1 commit into
ceph:mainfrom
anthonyeleven:adatri/osd-backfill-recovery-desc-clarify

Conversation

@anthonyeleven

@anthonyeleven anthonyeleven commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

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

Description

osd_max_backfills and osd_recovery_max_active[_hdd|_ssd] are routinely confused because the names imply they do the same thing. They operate at different granularities:

  • osd_max_backfills is a per-OSD reservation limit on whole PGs: it caps how many PGs may be backfilling at once (concurrency), not the rate of each one. An erasure-coded PG must reserve a slot on every shard's OSD simultaneously, so wide EC pools stall on it even when the disks are idle.
  • osd_recovery_max_active[_hdd|_ssd] is a per-OSD limit on individual object operations in flight. Despite the "recovery" name it throttles backfill data movement as well as log-based recovery, so it sets the rate, not the concurrency.

This rewrites the fmt_desc of all four options to state which controls concurrency and which controls rate, notes that osd_recovery_max_active governs backfill as well as recovery, and cross-links the pair via see_also.

It also harmonizes osd_max_backfills onto the same desc/fmt_desc/note shape as the recovery options — it previously had a long_desc and no fmt_desc, so its detail did not render in the config reference. The read/write detail moves into fmt_desc; the mClock caveat becomes a note.

Documentation-only; no behavior change.

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.

Signed-off-by: Anthony D'Atri [email protected]
Assisted-by: Claude Opus-4.8

@github-actions

Copy link
Copy Markdown

Config Diff Tool Output

! changed: osd_recovery_max_active: old: The number of active recovery requests per OSD at one time. More requests will accelerate recovery, but the requests places an increased load on the cluster. (osd.yaml.in)
! changed: osd_recovery_max_active: new: The number of recovery operations (individual object pushes and pulls) that may be in flight at once on a single OSD, summed across all of that OSD's actively recovering and backfilling PGs. Despite the name, this also throttles the data-movement rate of backfill, not just log-based recovery; it governs how fast the active work proceeds, whereas ``osd_max_backfills`` governs how many PGs may be backfilling at once. More operations accelerate recovery and backfill at the cost of higher OSD load; when the disks are not saturated, this is the effective throughput lever. (osd.yaml.in)
! changed: osd_recovery_max_active: old: ['osd_recovery_max_active_hdd', 'osd_recovery_max_active_ssd', 'osd_mclock_override_recovery_settings'] (osd.yaml.in)
! changed: osd_recovery_max_active: new: ['osd_max_backfills', 'osd_recovery_max_active_hdd', 'osd_recovery_max_active_ssd', 'osd_mclock_override_recovery_settings'] (osd.yaml.in)
! changed: osd_recovery_max_active_hdd: old: The number of active recovery requests per OSD at one time, if the primary device is rotational. (osd.yaml.in)
! changed: osd_recovery_max_active_hdd: new: As ``osd_recovery_max_active`` (the number of in-flight recovery/backfill object operations per OSD), applied when ``osd_recovery_max_active`` is ``0`` and the OSD's primary device is rotational (an HDD). (osd.yaml.in)
! changed: osd_recovery_max_active_hdd: old: ['osd_recovery_max_active', 'osd_recovery_max_active_ssd', 'osd_mclock_override_recovery_settings'] (osd.yaml.in)
! changed: osd_recovery_max_active_hdd: new: ['osd_max_backfills', 'osd_recovery_max_active', 'osd_recovery_max_active_ssd', 'osd_mclock_override_recovery_settings'] (osd.yaml.in)
! changed: osd_max_backfills: old:  (osd.yaml.in)
! changed: osd_max_backfills: new: The maximum number of PGs that may be backfilling into or out of a single OSD at one time. This is a reservation limit, so it caps backfill concurrency (how many PGs move at once), not the rate at which each one moves; for that, see ``osd_recovery_max_active``. Backfill is the bulk copy of a whole PG to a new location, as opposed to log-based recovery of individual objects. The limit is counted separately for the source (read) and destination (write) side of a backfill. Because an erasure-coded PG must hold a reservation on all of its shards' OSDs at once, wide EC pools are frequently limited by this even when the disks are near-idle. (osd.yaml.in)
! changed: osd_max_backfills: old:  (osd.yaml.in)
! changed: osd_max_backfills: new: This setting is automatically reset when the mClock scheduler is used. (osd.yaml.in)
! changed: osd_max_backfills: old: The maximum number of backfills allowed to or from a single OSD. Note that this is applied separately for read and write operations. This setting is automatically reset when the mClock scheduler is used. (osd.yaml.in)
! changed: osd_max_backfills: new:  (osd.yaml.in)
! changed: osd_max_backfills: old: ['osd_mclock_override_recovery_settings'] (osd.yaml.in)
! changed: osd_max_backfills: new: ['osd_recovery_max_active', 'osd_recovery_max_active_hdd', 'osd_recovery_max_active_ssd', 'osd_mclock_override_recovery_settings'] (osd.yaml.in)
! changed: osd_max_backfills: old: Maximum number of concurrent backfills to or from a single OSD. (osd.yaml.in)
! changed: osd_max_backfills: new: Maximum number of PGs concurrently backfilling to or from a single OSD. (osd.yaml.in)
! changed: osd_recovery_max_active_ssd: old: The number of active recovery requests per OSD at one time, if the primary device is non-rotational (i.e., an SSD). (osd.yaml.in)
! changed: osd_recovery_max_active_ssd: new: As ``osd_recovery_max_active`` (the number of in-flight recovery/backfill object operations per OSD), applied when ``osd_recovery_max_active`` is ``0`` and the OSD's primary device is non-rotational (an SSD). (osd.yaml.in)
! changed: osd_recovery_max_active_ssd: old: ['osd_recovery_max_active', 'osd_recovery_max_active_hdd', 'osd_mclock_override_recovery_settings'] (osd.yaml.in)
! changed: osd_recovery_max_active_ssd: new: ['osd_max_backfills', 'osd_recovery_max_active', 'osd_recovery_max_active_hdd', 'osd_mclock_override_recovery_settings'] (osd.yaml.in)

The above configuration changes are found in the PR. Please update the relevant release documentation if necessary.
Ignore this comment if docs are already updated. To make the "Check ceph config changes" CI check pass, please comment /config check ok and re-run the test.

@anthonyeleven

Copy link
Copy Markdown
Contributor Author

/config check ok

Comment thread src/common/options/osd.yaml.in Outdated
Comment on lines +58 to +59
for that, see ``osd_recovery_max_active``. Backfill is the bulk copy of a whole
PG to a new location, as opposed to log-based recovery of individual objects.

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.

"Bulk copy of whole PG" seems misleading as backfill scans replicas first to allow selective pushes of missed objects.

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.

Interesting, I thought backfill is always an unconditional push of the whole PG, vs recovery when it's selective based on the pg log and epoch. I'm rewording.

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.

better?

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.

Reworded again — it now reads: backfill "populates a PG on an OSD by scanning its object set and sending the objects the target is missing (used when the PG log cannot drive recovery, e.g. an OSD new to the PG)." That drops the whole-PG-copy framing and makes the scan / selective-push behavior explicit. Thanks for the catch.

@anthonyeleven
anthonyeleven force-pushed the adatri/osd-backfill-recovery-desc-clarify branch 2 times, most recently from 1da5a62 to e4d9261 Compare September 12, 2026 18:54
@anthonyeleven

Copy link
Copy Markdown
Contributor Author

@bluikko

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

@bluikko

In general LGTM, but the configurable descriptions are significantly more detailed and I lack the expertise to say if they're accurate. Hoping @rzarzynski might weigh in on the relevant comment thread.

@bluikko

bluikko commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

@bluikko

Shouldn't the commit message "Assisted by [...]" trailer be "Assisted-by: [...]"?

These two knobs are routinely confused because the names suggest they do the
same thing. They operate at different granularities:

- osd_max_backfills is a per-OSD reservation limit on whole PGs. It caps how
  many PGs may be backfilling at once (concurrency), not the rate of each one,
  and an erasure-coded PG must reserve a slot on every shard's OSD at the same
  time -- which is why wide EC pools stall on it even when disks are idle.
- osd_recovery_max_active[_hdd|_ssd] limits individual object operations in
  flight per OSD. Despite the "recovery" name it throttles backfill's data
  movement as well as log-based recovery, so it sets the rate, not the
  concurrency.

Rewrite the fmt_desc of all four to say which is concurrency and which is rate,
state that osd_recovery_max_active governs backfill too, and cross-link the pair
via see_also. Also harmonize osd_max_backfills onto the same desc/fmt_desc/note
shape as the recovery options -- it previously carried a long_desc and no
fmt_desc, so its detail did not render in the online docs. The read/write detail
moves into fmt_desc and the mClock caveat becomes a note.

Signed-off-by: Anthony D'Atri <[email protected]>
Assisted-by: Claude Opus-4.8
@anthonyeleven
anthonyeleven force-pushed the adatri/osd-backfill-recovery-desc-clarify branch from e4d9261 to 26052a6 Compare October 19, 2026 17:50
@anthonyeleven

Copy link
Copy Markdown
Contributor Author

Shouldn't the commit message "Assisted by [...]" trailer be "Assisted-by: [...]"?

Yes, thanks. The commit now ends with Assisted-by: Claude Opus-4.8, which git interpret-trailers parses as a trailer. Nothing else in the commit changed. The PR description matches.

@rzarzynski, does the reworded backfill description in your thread address your point?

@anthonyeleven
anthonyeleven merged commit cfffafd into ceph:main Oct 26, 2026
18 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.

3 participants