Uh oh!
There was an error while loading. Please reload this page.
[Opt] (multi-catalog) opt max scanner thread number in batch split mode. - #44635
Conversation
doris-robot
commented
Nov 26, 2024
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
kaka11chen
commented
Nov 26, 2024
run buildall |
0a75c6d to
b8c3297Comparekaka11chen
commented
Nov 26, 2024
run buildall |
doris-robot
commented
Nov 26, 2024
TeamCity be ut coverage result: |
doris-robot
commented
Nov 26, 2024
TPC-H: Total hot run time: 39878 ms |
doris-robot
commented
Nov 26, 2024
TPC-DS: Total hot run time: 196384 ms |
doris-robot
commented
Nov 26, 2024
ClickBench: Total hot run time: 32.26 s |
b8c3297 to
5016ffaCompareclang-tidy review says "All clean, LGTM! 👍" |
5016ffa to
a7db9f0Comparekaka11chen
commented
Dec 30, 2024
run buildall |
doris-robot
commented
Dec 30, 2024
TPC-H: Total hot run time: 32892 ms |
doris-robot
commented
Dec 30, 2024
TPC-DS: Total hot run time: 197373 ms |
doris-robot
commented
Dec 30, 2024
ClickBench: Total hot run time: 31.22 s |
doris-robot
commented
Dec 30, 2024
TeamCity be ut coverage result: |
a7db9f0 to
b612a1cComparekaka11chen
commented
Jan 16, 2025
run buildall |
doris-robot
commented
Jan 16, 2025
TPC-H: Total hot run time: 32422 ms |
doris-robot
commented
Jan 16, 2025
TPC-DS: Total hot run time: 188040 ms |
doris-robot
commented
Jan 16, 2025
ClickBench: Total hot run time: 30.28 s |
doris-robot
commented
Jan 16, 2025
TeamCity be ut coverage result: |
| // There's only one scan range for each backend in batch split mode. Each backend only starts up one ScanNode instance. | ||
| uint32_t shard_num = | ||
| std::min(config::doris_scanner_thread_pool_thread_num / | ||
| (_batch_split_mode ? 1 : state()->query_parallel_instance_num()), |
There was a problem hiding this comment.
I suggest to extract this _batch_split_mode ? 1 : state()->query_parallel_instance_num() to a method in file scan operator.
| template <typename Derived> | ||
| Status ScanLocalState<Derived>::_start_scanners( | ||
| Status ScanLocalState<Derived>::start_scanners( |
There was a problem hiding this comment.
The only difference between this and file_scan_operator is that file_scan_operator pass the query_parallel_instance_num separately.
So I suggest to create a new virtual method get_query_parallel_instance_num(),
and for scan_operator, it returns state()->query_parallel_instance_num().
For file_scan_operator, it returns _batch_split_mode ? 1 : state()->query_parallel_instance_num()
c473752 to
090ec3eCompare090ec3e to
8af9be6Comparekaka11chen
commented
Jan 17, 2025
run buildall |
kaka11chen
commented
Jan 17, 2025
run buildall |
doris-robot
commented
Jan 17, 2025
TPC-H: Total hot run time: 32841 ms |
doris-robot
commented
Jan 17, 2025
TPC-DS: Total hot run time: 194319 ms |
doris-robot
commented
Jan 17, 2025
ClickBench: Total hot run time: 30.65 s |
doris-robot
commented
Jan 17, 2025
TeamCity be ut coverage result: |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
…de. (apache#44635) ### What problem does this PR solve? Problem Summary: There's only one scan range for each backend in batch split mode. Each backend only starts up one ScanNode instance. However, when calculating the concurrency of scanners in the scan operator in batch split mode, it is not divided by 1, but by `query_parallel_instance_num`, resulting in poor performance of batch split mode.
…de. (apache#44635) Problem Summary: There's only one scan range for each backend in batch split mode. Each backend only starts up one ScanNode instance. However, when calculating the concurrency of scanners in the scan operator in batch split mode, it is not divided by 1, but by `query_parallel_instance_num`, resulting in poor performance of batch split mode.
…de. (apache#44635) Problem Summary: There's only one scan range for each backend in batch split mode. Each backend only starts up one ScanNode instance. However, when calculating the concurrency of scanners in the scan operator in batch split mode, it is not divided by 1, but by `query_parallel_instance_num`, resulting in poor performance of batch split mode.
…de. (apache#44635) ### What problem does this PR solve? Problem Summary: There's only one scan range for each backend in batch split mode. Each backend only starts up one ScanNode instance. However, when calculating the concurrency of scanners in the scan operator in batch split mode, it is not divided by 1, but by `query_parallel_instance_num`, resulting in poor performance of batch split mode.
What problem does this PR solve?
Problem Summary:
There's only one scan range for each backend in batch split mode. Each backend only starts up one ScanNode instance. However, when calculating the concurrency of scanners in the scan operator in batch split mode, it is not divided by 1, but by
query_parallel_instance_num, resulting in poor performance of batch split mode.Release note
There's only one scan range for each backend in batch split mode. Each backend only starts up one ScanNode instance. However, when calculating the concurrency of scanners in the scan operator in batch split mode, it is not divided by 1, but by
query_parallel_instance_num, resulting in poor performance of batch split mode.Fix calculation of maximum number of scanner threads in batch split mode.
Check List (For Author)
Test
select * from par_tablein doris.MaxScannerThreadNum.You should be able to see that each be node of the scan operator is 1, and there will be more
MaxScannerThreadNumin the scan operator.Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)