-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[debug](rpc) debug rpc time consumption problem #39852
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
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
|
run buildall |
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.
clang-tidy made some suggestions
a114052 to
c1387a3
Compare
…lacklist to skip some backend during query
c1387a3 to
fc8bc74
Compare
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.
clang-tidy made some suggestions
|
run buildall |
ce2ce33 to
b268b08
Compare
| template <typename Parent> | ||
| void ExchangeSinkBuffer<Parent>::register_sink(TUniqueId fragment_instance_id) { | ||
| void ExchangeSinkBuffer<Parent>::register_sink(TUniqueId fragment_instance_id, | ||
| vectorized::PipChannel<Parent>* channel) { |
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.
增加这个channel 变量的目的是?
| template <typename Parent> | ||
| Status ExchangeSinkBuffer<Parent>::_send_rpc(InstanceLoId id) { | ||
| if (_parent) { | ||
| SCOPED_TIMER(_parent->brpc_send_timer()); |
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.
这么写没意义, scoped 就是在这个 {} 有用
| out << "Instance " << std::hex << stats->inst_lo_id; | ||
| auto stats_str = fmt::format( | ||
| "Count: {}, MaxTime: {}, MinTime: {}, AvgTime: {}, SumTime: {}", | ||
| stats->rpc_count, PrettyPrinter::print(stats->max_time, TUnit::TIME_NS), |
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.
CloseTime: avg 11.310us, max 11.310us, min 11.310us
- ExecTime: avg 150.158us, max 150.158us, min 150.158us
- InitTime: avg 72.193us, max 72.193us, min 72.193us
| [](const auto& a, const auto& b) { return a->max_time > b->max_time; }); | ||
| auto count = std::min((size_t)max_count, _instance_to_rpc_stats_vec.size()); | ||
| int i = 0; | ||
| auto* detail_profile = profile->create_child("RpcInstanceDetails", true, true); |
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.
这个profile 对象得检查下是否为nullptr
b268b08 to
51145fb
Compare
|
clang-tidy review says "All clean, LGTM! 👍" |
|
run buildall |
…n problem (#43284) Picked from the 2.1 branch, only the RPC profile-related code was selected. #39852 #40117 ``` DATA_STREAM_SINK_OPERATOR (id=2,dst_id=2): - RpcCount: sum 16, avg 4, max 4, min 4 - RpcMaxTime: avg 1.15ms, max 1.163ms, min 818.493us - RpcAvgTime: 11.850ms - RpcCount: 10 - RpcMaxTime: 86.891ms - RpcMinTime: 15.200ms - RpcSumTime: 118.503ms - SerializeBatchTime: 13.517ms - SplitBlockDistributeByChannelTime: 38.923ms - SplitBlockHashComputeTime: 2.659ms - UncompressedRowBatchSize: 135.19 KB - WaitForDependencyTime: 0ns - WaitForRpcBufferQueue: 0ns RpcInstanceDetails: - Instance 85d4f75b72a9ea61: Count: 4, MaxTime: 36.238ms, MinTime: 12.107ms, AvgTime: 21.722ms, SumTime: 86.891ms - Instance 85d4f75b72a9ea91: Count: 3, MaxTime: 11.107ms, MinTime: 2.431ms, AvgTime: 5.470ms, SumTime: 16.412ms - Instance 85d4f75b72a9eac1: Count: 3, MaxTime: 7.554ms, MinTime: 3.160ms, AvgTime: 5.066ms, SumTime: 15.200m ```
…n problem (apache#43284) Picked from the 2.1 branch, only the RPC profile-related code was selected. apache#39852 apache#40117 ``` DATA_STREAM_SINK_OPERATOR (id=2,dst_id=2): - RpcCount: sum 16, avg 4, max 4, min 4 - RpcMaxTime: avg 1.15ms, max 1.163ms, min 818.493us - RpcAvgTime: 11.850ms - RpcCount: 10 - RpcMaxTime: 86.891ms - RpcMinTime: 15.200ms - RpcSumTime: 118.503ms - SerializeBatchTime: 13.517ms - SplitBlockDistributeByChannelTime: 38.923ms - SplitBlockHashComputeTime: 2.659ms - UncompressedRowBatchSize: 135.19 KB - WaitForDependencyTime: 0ns - WaitForRpcBufferQueue: 0ns RpcInstanceDetails: - Instance 85d4f75b72a9ea61: Count: 4, MaxTime: 36.238ms, MinTime: 12.107ms, AvgTime: 21.722ms, SumTime: 86.891ms - Instance 85d4f75b72a9ea91: Count: 3, MaxTime: 11.107ms, MinTime: 2.431ms, AvgTime: 5.470ms, SumTime: 16.412ms - Instance 85d4f75b72a9eac1: Count: 3, MaxTime: 7.554ms, MinTime: 3.160ms, AvgTime: 5.066ms, SumTime: 15.200m ```
…n problem (apache#43284) Picked from the 2.1 branch, only the RPC profile-related code was selected. apache#39852 apache#40117 ``` DATA_STREAM_SINK_OPERATOR (id=2,dst_id=2): - RpcCount: sum 16, avg 4, max 4, min 4 - RpcMaxTime: avg 1.15ms, max 1.163ms, min 818.493us - RpcAvgTime: 11.850ms - RpcCount: 10 - RpcMaxTime: 86.891ms - RpcMinTime: 15.200ms - RpcSumTime: 118.503ms - SerializeBatchTime: 13.517ms - SplitBlockDistributeByChannelTime: 38.923ms - SplitBlockHashComputeTime: 2.659ms - UncompressedRowBatchSize: 135.19 KB - WaitForDependencyTime: 0ns - WaitForRpcBufferQueue: 0ns RpcInstanceDetails: - Instance 85d4f75b72a9ea61: Count: 4, MaxTime: 36.238ms, MinTime: 12.107ms, AvgTime: 21.722ms, SumTime: 86.891ms - Instance 85d4f75b72a9ea91: Count: 3, MaxTime: 11.107ms, MinTime: 2.431ms, AvgTime: 5.470ms, SumTime: 16.412ms - Instance 85d4f75b72a9eac1: Count: 3, MaxTime: 7.554ms, MinTime: 3.160ms, AvgTime: 5.066ms, SumTime: 15.200m ```
…n problem (apache#43284) Picked from the 2.1 branch, only the RPC profile-related code was selected. apache#39852 apache#40117 ``` DATA_STREAM_SINK_OPERATOR (id=2,dst_id=2): - RpcCount: sum 16, avg 4, max 4, min 4 - RpcMaxTime: avg 1.15ms, max 1.163ms, min 818.493us - RpcAvgTime: 11.850ms - RpcCount: 10 - RpcMaxTime: 86.891ms - RpcMinTime: 15.200ms - RpcSumTime: 118.503ms - SerializeBatchTime: 13.517ms - SplitBlockDistributeByChannelTime: 38.923ms - SplitBlockHashComputeTime: 2.659ms - UncompressedRowBatchSize: 135.19 KB - WaitForDependencyTime: 0ns - WaitForRpcBufferQueue: 0ns RpcInstanceDetails: - Instance 85d4f75b72a9ea61: Count: 4, MaxTime: 36.238ms, MinTime: 12.107ms, AvgTime: 21.722ms, SumTime: 86.891ms - Instance 85d4f75b72a9ea91: Count: 3, MaxTime: 11.107ms, MinTime: 2.431ms, AvgTime: 5.470ms, SumTime: 16.412ms - Instance 85d4f75b72a9eac1: Count: 3, MaxTime: 7.554ms, MinTime: 3.160ms, AvgTime: 5.066ms, SumTime: 15.200m ```
…n problem (apache#43284) Picked from the 2.1 branch, only the RPC profile-related code was selected. apache#39852 apache#40117 ``` DATA_STREAM_SINK_OPERATOR (id=2,dst_id=2): - RpcCount: sum 16, avg 4, max 4, min 4 - RpcMaxTime: avg 1.15ms, max 1.163ms, min 818.493us - RpcAvgTime: 11.850ms - RpcCount: 10 - RpcMaxTime: 86.891ms - RpcMinTime: 15.200ms - RpcSumTime: 118.503ms - SerializeBatchTime: 13.517ms - SplitBlockDistributeByChannelTime: 38.923ms - SplitBlockHashComputeTime: 2.659ms - UncompressedRowBatchSize: 135.19 KB - WaitForDependencyTime: 0ns - WaitForRpcBufferQueue: 0ns RpcInstanceDetails: - Instance 85d4f75b72a9ea61: Count: 4, MaxTime: 36.238ms, MinTime: 12.107ms, AvgTime: 21.722ms, SumTime: 86.891ms - Instance 85d4f75b72a9ea91: Count: 3, MaxTime: 11.107ms, MinTime: 2.431ms, AvgTime: 5.470ms, SumTime: 16.412ms - Instance 85d4f75b72a9eac1: Count: 3, MaxTime: 7.554ms, MinTime: 3.160ms, AvgTime: 5.066ms, SumTime: 15.200m ```
Proposed changes
Issue Number: close #xxx
Add detail RPC time info for each channel, sorted by max rpc time of channels: