-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Opt](scanner-scheduler) Opt scanner scheduler starvation issue. #40641
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
[Opt](scanner-scheduler) Opt scanner scheduler starvation issue. #40641
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
|
run buildall |
86c08f6 to
ca2e7e3
Compare
|
run buildall |
|
TeamCity be ut coverage result: |
ca2e7e3 to
af7b099
Compare
|
run buildall |
TPC-H: Total hot run time: 42132 ms |
TPC-DS: Total hot run time: 194081 ms |
|
TeamCity be ut coverage result: |
ClickBench: Total hot run time: 32.69 s |
morningman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
a1b1e78 to
2087b56
Compare
|
run buildall |
zhiqiang-hhhh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by anyone and no changes requested. |
2087b56 to
725afd0
Compare
|
run buildall |
TPC-H: Total hot run time: 43020 ms |
TPC-DS: Total hot run time: 195427 ms |
ClickBench: Total hot run time: 33.62 s |
|
TeamCity be ut coverage result: |
|
PR approved by at least one committer and no changes requested. |
…che#40641) When a scanner scheduler is stuck in executing a scan task, other scan tasks will starve and have no chance to execute, which will affect other queries. Currently, the scan task hopes to scan as much data as possible to reduce the overhead of scheduling switching. Currently, it hopes to obtain up to 10MB of data in `doris_scanner_row_bytes`. However, if a query scans a table with many rows of data, but the filtering rate is very high, the filter will eventually filter out a lot of data and will never get 10MB of data. It will keep getting and executing expression filtering, which will cause other scan tasks to starve. The current solution is to check `max_run_time_ms` by `MonotonicStopWatch`. After executing for a maximum of 1s, it will yield self's task for other tasks. When the scan task executes some time-consuming tasks, it needs to slice to do it.
…che#40641) When a scanner scheduler is stuck in executing a scan task, other scan tasks will starve and have no chance to execute, which will affect other queries. Currently, the scan task hopes to scan as much data as possible to reduce the overhead of scheduling switching. Currently, it hopes to obtain up to 10MB of data in `doris_scanner_row_bytes`. However, if a query scans a table with many rows of data, but the filtering rate is very high, the filter will eventually filter out a lot of data and will never get 10MB of data. It will keep getting and executing expression filtering, which will cause other scan tasks to starve. The current solution is to check `max_run_time_ms` by `MonotonicStopWatch`. After executing for a maximum of 1s, it will yield self's task for other tasks. When the scan task executes some time-consuming tasks, it needs to slice to do it.
) ## Proposed changes Backport #40641
) ## Proposed changes Backport #40641
…che#40641) ## Proposed changes ### Issue When a scanner scheduler is stuck in executing a scan task, other scan tasks will starve and have no chance to execute, which will affect other queries. Currently, the scan task hopes to scan as much data as possible to reduce the overhead of scheduling switching. Currently, it hopes to obtain up to 10MB of data in `doris_scanner_row_bytes`. However, if a query scans a table with many rows of data, but the filtering rate is very high, the filter will eventually filter out a lot of data and will never get 10MB of data. It will keep getting and executing expression filtering, which will cause other scan tasks to starve. ### Solution The current solution is to check `max_run_time_ms` by `MonotonicStopWatch`. After executing for a maximum of 1s, it will yield self's task for other tasks. When the scan task executes some time-consuming tasks, it needs to slice to do it.
…ate materialization case of parquet reader (#46121) ### What problem does this PR solve? Related PR: #40641 Problem Summary: [Fix](parquet-reader) Fixed the issue of excessive scanning data in late materialization case of parquet reader introduced by #40641 in scenarios with particularly high filtering rates.
…ate materialization case of parquet reader (#46121) ### What problem does this PR solve? Related PR: #40641 Problem Summary: [Fix](parquet-reader) Fixed the issue of excessive scanning data in late materialization case of parquet reader introduced by #40641 in scenarios with particularly high filtering rates.
…ate materialization case of parquet reader (#46121) ### What problem does this PR solve? Related PR: #40641 Problem Summary: [Fix](parquet-reader) Fixed the issue of excessive scanning data in late materialization case of parquet reader introduced by #40641 in scenarios with particularly high filtering rates.
Proposed changes
Issue
When a scanner scheduler is stuck in executing a scan task, other scan tasks will starve and have no chance to execute, which will affect other queries. Currently, the scan task hopes to scan as much data as possible to reduce the overhead of scheduling switching. Currently, it hopes to obtain up to 10MB of data in
doris_scanner_row_bytes. However, if a query scans a table with many rows of data, but the filtering rate is very high, the filter will eventually filter out a lot of data and will never get 10MB of data. It will keep getting and executing expression filtering, which will cause other scan tasks to starve.Solution
The current solution is to check
max_run_time_msbyMonotonicStopWatch. After executing for a maximum of 1s, it will yield self's task for other tasks. When the scan task executes some time-consuming tasks, it needs to slice to do it.