Repository navigation
tools/cephfs_mirror: Distribute datasync threads evenly across snapshots - #67546
Conversation
Config Diff Tool Output+ added: cephfs_mirror_datasync_files_per_batch (cephfs-mirror.yaml.in)
+ added: cephfs_mirror_distribute_datasync_threads (cephfs-mirror.yaml.in)
The above configuration changes are found in the PR. Please update the relevant release documentation if necessary. |
|
/config check ok |
|
@vshankar please take look |
|
jenkins test make check arm64 |
|
/config check ok |
There was a problem hiding this comment.
Pull request overview
This PR improves CephFS mirroring’s datasync scheduling so that (optionally) datasync worker threads are shared more evenly across multiple queued snapshot syncs, reducing starvation when one large snapshot dominates the queue.
Changes:
- Add configurable “fair scheduling” for datasync threads across queued snapshots (
cephfs_mirror_distribute_datasync_threads). - Add a batching knob to control how many files a datasync thread processes per scheduling cycle (
cephfs_mirror_datasync_files_per_batch). - Add QA coverage for starvation vs non-starvation behavior and document the new configuration options.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tools/cephfs_mirror/PeerReplayer.h | Adds helpers/state for fair scheduling and batching configuration. |
| src/tools/cephfs_mirror/PeerReplayer.cc | Implements fair-share limiting in has_pending_work(), batching in datasync loop, and config refresh helper. |
| src/common/options/cephfs-mirror.yaml.in | Introduces new cephfs-mirror configuration options and their descriptions/defaults. |
| qa/tasks/cephfs/test_mirroring.py | Adds integration tests validating starvation behavior with the option toggled. |
| doc/cephfs/cephfs-mirroring.rst | Exposes the new options in the mirroring documentation via confval entries. |
You can also share your feedback on Copilot code review. Take the survey.
All datasync threads consume one snapshot at a time. This starves the other queued snapshots for sync. Provide an option to distribute the datasync threads equally among queued snapshots. Add the configuration cephfs_mirror_distribute_datasync_threads to enable/disable data sync threads fair scheduling among snapshots queued for syncing. Fixes: https://tracker.ceph.com/issues/75091 Signed-off-by: Kotresh HR <[email protected]>
d9ba79a to
27f2b4f
Compare
Introduces file batching for datasync threads, it's the maximum number of files that a datasync thread processes per scheduling cycle before yielding. The number of files per batch can be configured using the config 'cephfs_mirror_datasync_files_per_batch'. The default is set to 64 Fixes: https://tracker.ceph.com/issues/75091 Signed-off-by: Kotresh HR <[email protected]>
27f2b4f to
fcf99b3
Compare
|
Following test case added for starvation is failed Cause: |
Document following options introduced 1. cephfs_mirror_distribute_datasync_threads 2. cephfs_mirror_datasync_files_per_batch Fixes: https://tracker.ceph.com/issues/75091 Signed-off-by: Kotresh HR <[email protected]>
fcf99b3 to
5e58b26
Compare
Fixed this by increasing files count as below: |
Runs are successful: |
|
This PR is under test in https://tracker.ceph.com/issues/75674. |
* refs/pull/67546/head:
* refs/pull/67546/head: doc: Document cephfs multithread mirror configs qa: Validate datasync thread fair scheduling tools/cephfs-mirror: Introduce file batching for datasync threads tools/cephfs_mirror: Distribute datasync threads across snapshots
|
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 |
All datasync threads consume one snapshot at a time.
This starves the other queued snapshots for sync.
Provide an option to distribute the datasync threads
equally among queued snapshots.
Add the configuration cephfs_mirror_distribute_datasync_threads
to enable/disable data sync threads fair scheduling among
snapshots queued for syncing.
Fixes: https://tracker.ceph.com/issues/75091
Signed-off-by: Kotresh HR [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
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.