Skip to content

Conversation

@swapsmagic
Copy link
Contributor

@swapsmagic swapsmagic commented Oct 21, 2022

In disaggregated coordinator, each coordinator is considering it's own running queries to decide which
resource group should run the next query in weighted fair scheduling. This lead to an issue when
with n coordinators each allowing single query to run for the resource group which has lower weight
and lead to n slots been used by the resource group even if it's weight will allow it to run lower than
n queries.

With the fix, we consider global running query count for the given resource group, which helps decide the
correct number of queries we should run for a lower weight resource group and allow more slots be given to
high priority resource group as per weighted fair scheduling.

Test plan - unit test + shadow run

== RELEASE NOTES ==

General Changes
* Fix for weighted fair scheduling in disaggregated coordinator

@swapsmagic swapsmagic requested a review from a team as a code owner October 21, 2022 06:18
@swapsmagic swapsmagic requested a review from presto-oss October 21, 2022 06:18
@swapsmagic swapsmagic force-pushed the disagg_weighted_fair_fix branch 2 times, most recently from c5c51c1 to 4fb3642 Compare October 21, 2022 22:47
@swapsmagic swapsmagic force-pushed the disagg_weighted_fair_fix branch from 4fb3642 to 59c4a8b Compare October 21, 2022 22:51
In disagg coordinator, each coorinator is considering it's own running queries to decide which
resource group should run the next query in weighted fair scheduling. This lead to an issue when
with n coordinators each allowing single query to run for the resource group which has lower weight
and lead to n slots been used by the resource group even if it's weight will allow it to run lower than
n queries.

With the fix, we consider global running query count for the given resource group, which helps decide the
correct number of queries we should run for a lower weight resource group and allow more slots be given to
high priority resource group as per weighted fair scheduling.
@swapsmagic swapsmagic force-pushed the disagg_weighted_fair_fix branch from 59c4a8b to 2aa0b44 Compare October 22, 2022 01:32
@tdcmeehan tdcmeehan merged commit 0628c0d into prestodb:master Oct 24, 2022
@wanglinsong wanglinsong mentioned this pull request Jan 12, 2023
30 tasks
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.

3 participants