Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement]: Optimize task scheduling logic to enable concurrent execution of tasks #39101

Open
1 task done
xiaocai2333 opened this issue Jan 9, 2025 · 2 comments
Open
1 task done
Assignees
Labels
kind/enhancement Issues or changes related to enhancement

Comments

@xiaocai2333
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

What would you like to be added?

Optimize task scheduling logic to enable concurrent execution of tasks.

Why is this needed?

Stats tasks are primarily io operations, which can be executed concurrently.
Additionally, when segments are relatively small, index tasks can also be executed concurrently.

Anything else?

No response

@xiaocai2333 xiaocai2333 added the kind/enhancement Issues or changes related to enhancement label Jan 9, 2025
@xiaocai2333 xiaocai2333 self-assigned this Jan 9, 2025
@xiaocai2333
Copy link
Contributor Author

Configure slots for tasks and IndexNode. By default, the slot count for IndexNode is 16, and the slot count for index tasks is also 16. This means that under normal circumstances, an IndexNode can execute only one index task at a time. The slot count for stats tasks is 4, meaning an IndexNode can execute up to 4 stats tasks concurrently.

@xiaofan-luan
Copy link
Collaborator

I think indexNode slot number should be related to cpu cores and memory?
by default 2core 8GB memory is a slot.

A index node has 16core 64GB is 8 slot, 8 core 64GB is 4 slot.

For Segment > 500MB, Each index task takes 8 slots
For Segment between 100MB - 500MB, each index task takes 4 slots.
For Segment between 10MB - 100MB, each index task takes 2 lots.
For Segment smaller than 10MB, each index task takes 1 slots.

On the other side, For Segment > 500MB, each index takes 2 slots.
For segment < 500MB, each index takes 1 slots.

If a task request is larger than slot number, then any index task can take this task and can take only one task at then same time.

please comment @xiaocai2333 @czs007

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Issues or changes related to enhancement
Projects
None yet
Development

No branches or pull requests

2 participants