Skip to content

Crimson: Implement seastar based QoS - #67874

Closed
mohit84 wants to merge 4 commits into
ceph:mainfrom
mohit84:seastar_qos
Closed

mohit84 wants to merge 4 commits into
ceph:mainfrom
mohit84:seastar_qos

Conversation

@mohit84

@mohit84 mohit84 commented Mar 18, 2026 •

Copy link
Copy Markdown
Contributor

Crimson: introduce scheduling-group based QoS with io-properties support

Introduce scheduling-group based QoS framework for Crimson OSD,
including configuration, initialization, and execution path integration.

  • Add io-properties-file support in Seastore
  • Introduce QoS-related configuration options
  • Create scheduling groups during OSD startup with dynamic reconfiguration
  • Integrate scheduling groups into OSD operation execution via with_sg

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

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.

@github-actions

github-actions Bot commented Mar 18, 2026 •

Copy link
Copy Markdown

Config Diff Tool Output

+ added: crimson_sg_client_shares (crimson.yaml.in)
+ added: crimson_sg_client_bandwidth (crimson.yaml.in)
+ added: crimson_sg_background_bandwidth (crimson.yaml.in)
+ added: crimson_sg_background_shares (crimson.yaml.in)
+ added: crimson_io_properties_file (crimson.yaml.in)
+ added: crimson_enable_scheduling_groups (crimson.yaml.in)
+ added: crimson_sg_urgent_recovery_shares (crimson.yaml.in)
+ added: crimson_sg_scrub_bandwidth (crimson.yaml.in)
+ added: crimson_sg_peering_shares (crimson.yaml.in)
+ added: crimson_sg_recovery_shares (crimson.yaml.in)
+ added: crimson_sg_peering_bandwidth (crimson.yaml.in)
+ added: crimson_sg_recovery_bandwidth (crimson.yaml.in)
+ added: crimson_sg_scrub_shares (crimson.yaml.in)
+ added: crimson_sg_urgent_recovery_bandwidth (crimson.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.

@Matan-B Matan-B added this to Crimson Mar 18, 2026
@Matan-B Matan-B moved this to Awaits review in Crimson Mar 18, 2026
@Matan-B
Matan-B requested review from Matan-B and jdurgin March 18, 2026 13:57
@mohit84 mohit84 changed the title Crimson[WIP]: Implement seastar based QoS Crimson: Implement seastar based QoS Mar 20, 2026
@mohit84

mohit84 commented Mar 21, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@mohit84

mohit84 commented Mar 23, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@mohit84

mohit84 commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@mohit84

mohit84 commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@mohit84

mohit84 commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@mohit84

mohit84 commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test make check

1 similar comment
@mohit84

mohit84 commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@mohit84 mohit84 moved this from Awaits review to In Progress in Crimson Mar 27, 2026
Comment thread src/crimson/osd/shard_services.h Resolved
Comment thread src/crimson/osd/shard_services.h Resolved
Comment thread src/crimson/osd/shard_services.cc Outdated
if (changed.count(std::string(key))) {
auto new_shares = static_cast<float>(conf.get_val<uint64_t>(key));
INFO("handle_conf_change: updating {} to {}", std::string(key), new_shares);
(ss.*sg_member).set_shares(

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.

shall we populate this change to other cores with invoke_on_all(), so that the PRIMARY_CORE is aware of this change. this is the core where OSDSingletonState lives.

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.

seems OSDSingletonState only add itself to primary core by add_observer, so ConfigProxy->do_change will not invoke on other cores for OSDsingletonState, so should broadcast for the changes, please check the code.

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.

done

[] { return seastar::now(); }
)
).then_interruptible([this] {
return run(*pg);

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.

scheduling group hop does not help. as then_interruptible() does not inherit the sg from the previous task. might want to use something like

  co_await shard_services.with_sg(sg_background, [this]() -> seastar::future<> {                                                                                                                                                                                                                       
      // actual work here                                                                                                                                                                                                                                                                     
  });   

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.

We have to handle it separately , the current with_sg implemenation would not work because it expects seastar::future returning callables.

Comment thread src/crimson/osd/osd.cc Resolved
@Matan-B Matan-B mentioned this pull request Apr 13, 2026
4 of 14 tasks
@Matan-B

Matan-B commented May 3, 2026

Copy link
Copy Markdown
Contributor

Hey @mohit84, I think that @liu-chunmei would like to try use this mechanism for #67806. Any updates on this one? Thanks!

@mohit84

mohit84 commented May 4, 2026

Copy link
Copy Markdown
Contributor Author

Hey @mohit84, I think that @liu-chunmei would like to try use this mechanism for #67806. Any updates on this one? Thanks!
I have not tested yet so it will take some time.

shard_services.get_sg_background(),
[] { return seastar::now(); }
)
);

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.

which actual work is put into scheduling group here?

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.

Need to handle it separately or please check if you can implement it. The with_scheduling_group expects seastar::future returning callables here it returns differnt.

mohit84 added 4 commits May 5, 2026 16:39
Create several scheduling groups during osd startup and
reset the value at run time via handle_conf_change.

Signed-off-by: Mohit Agrawal <[email protected]>
@mohit84

mohit84 commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

@tchaikov Please review the patch.

static constexpr std::pair<std::string_view, seastar::scheduling_group ShardServices::*>
sg_bandwidth_keys[] = {
{"crimson_sg_client_bandwidth", &ShardServices::sg_client},
{"crimson_sg_peering_bandwidths", &ShardServices::sg_peering},

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.

Suggested change
{"crimson_sg_peering_bandwidths", &ShardServices::sg_peering},
{"crimson_sg_peering_bandwidth", &ShardServices::sg_peering},

Comment thread src/crimson/osd/shard_services.cc Resolved
default: 50
desc: Seastar scheduling group shares for scrub

- name: crimson_sg_background_shares

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.

when i read "background", i am confused, as IIUC, all ops not falling into the bucket of client requests are "background" ops:

Scheduling Group Operations Status
client ClientRequest, InternalClientRequest, LogMissingRequest, PGPCTRequest, RepRequest Used
peering PeeringEvent, PGAdvanceMap Used
urgent_recovery BackgroundRecoveryT (when scheduler_class == immediate) Used
recovery BackgroundRecoveryT (otherwise), RecoverySubRequest Used
scrub RemoteScrubEventBaseT Partially: ScrubAsyncOpT has TODO
background SnapTrimEvent Not used: TODO only

how do we plan to use it?

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.

I am not able to implement yet how to convert a non seastar future into seastar::future

@tchaikov

Copy link
Copy Markdown
Contributor

just out of curiosity, have we evaluated dmclock/mclock versus scheduling group?

@mohit84

mohit84 commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

just out of curiosity, have we evaluated dmclock/mclock versus scheduling group?

As per seastar document i believe the scheduling group based qos should be guranteed qos as compare to mclock based.

@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

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions Bot added the stale label Jul 13, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

@github-actions github-actions Bot closed this Aug 12, 2026
@Matan-B Matan-B moved this from In Progress to Unassigned / Drafts / Discussion in Crimson Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Unassigned / Drafts / Discussion

Development

Successfully merging this pull request may close these issues.

4 participants