Skip to content

Conversation

davidcheng0922
Copy link
Contributor

Which issue(s) this PR fixes:

longhorn/longhorn#10512

What this PR does / why we need it:

Introduce a balanced replica schedule method, detail in longhorn/longhorn#11922

Special notes for your reviewer:

Currently, rebalanceWeightAlpha is set to 1, which balances replicas purely based on usable storage. To make this behavior configurable, we can introduce a new setting.

Absolute size formula:

  • When disk capacities differ greatly, replicas are more likely to be scheduled on larger disks.

Ratio size formula:

  • Replicas are distributed more evenly among all disks, though smaller disks may reach full capacity sooner.

Hybrid formula:

  • Depends on the rebalanceWeightAlpha
  • hybrid = alpha*ratioImbalance + (1-alpha)*absoluteImbalance

Additional documentation or context

@davidcheng0922 davidcheng0922 self-assigned this Oct 8, 2025
@davidcheng0922 davidcheng0922 requested a review from a team October 8, 2025 05:07
Copy link

coderabbitai bot commented Oct 8, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@davidcheng0922 davidcheng0922 force-pushed the issue-10512-replica-auto-rebalance branch from 01289f4 to 677dca8 Compare October 8, 2025 05:08
@davidcheng0922 davidcheng0922 force-pushed the issue-10512-replica-auto-rebalance branch from 677dca8 to 0065134 Compare October 8, 2025 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant