Skip to content

Conversation

@weizuo93
Copy link
Contributor

Proposed changes

When creating a tablet, it is necessary to select a disk from all disks that meet the requirements on the BE node to store the tablet. In doris, the current disk selection strategy is to randomly select a disk from all disks that meet the requirements for tablet creation. After the cluster has been running for a long time, we found that the distribution of the number of tablets on different disks in a BE node is unbalanced. In order to solve this problem, we introduced the algorithm of "two random choices" for disk selection when creating the tablet:
(1) Select two disks from all disks that meet the requirements on the BE node randomly;
(2) Choose the disk with a smaller number of tablet from the two disks selected in (1) for tablet creation.

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • [] Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] Documentation Update (if none of the other choices apply)
  • [] Code refactor (Modify the code structure, format the code, etc...)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have create an issue on (Fix [Proposal] Optimize the disk selection strategy for tablet creation #4329), and have described the bug/feature there in detail
  • Compiling and unit tests pass locally with my changes
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] If this change need a document change, I have updated the document
  • Any dependent changes have been merged

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@morningman morningman added the approved Indicates a PR has been approved by one committer. label Aug 25, 2020
@morningman morningman merged commit 613c44e into apache:master Aug 26, 2020
acelyc111 pushed a commit to acelyc111/incubator-doris that referenced this pull request Jan 20, 2021
…ion (apache#4373)

When creating a tablet, it is necessary to select a disk from all disks that
meet the requirements on the BE node to store the tablet.

In Doris, the current disk selection strategy is to randomly select a disk
from all disks that meet the requirements for tablet creation.

After the cluster has been running for a long time, we found that the
distribution of the number of tablets on different disks in a BE node is unbalanced.

In order to solve this problem, we introduced the algorithm of "two random choices"
for disk selection when creating the tablet:
(1) Select two disks from all disks that meet the requirements on the BE node randomly;
(2) Choose the disk with a smaller number of tablet from the two disks selected in (1) for tablet creation.
@yangzhg yangzhg mentioned this pull request Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. kind/improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Proposal] Optimize the disk selection strategy for tablet creation

4 participants