-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Refactor] reduce sending audit stats in exchange #37083
Conversation
This reverts commit b859217. Signed-off-by: Zhuhe Fang <fzhedu@gmail.com>
Signed-off-by: Zhuhe Fang <fzhedu@gmail.com>
Signed-off-by: Zhuhe Fang <fzhedu@gmail.com>
request.params->clear_query_statistics(); | ||
_eos_query_stats[instance_id.lo]->to_pb(request.params->mutable_query_statistics()); | ||
_eos_query_stats[instance_id.lo]->clear(); | ||
if (auto final_stats = _fragment_ctx->runtime_state()->query_ctx()->intermediate_query_statistic()) { |
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.
what if there is a short circuit, the receiver side won't wait the last eos packet.
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.
it is up to the sent stats by _sent_audit_stats_frequency
} | ||
} | ||
} else { | ||
if ((_request_sent & _sent_audit_stats_frequency) == _sent_audit_stats_frequency) { |
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.
What if total _request_sent
is less than 127 ?
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.
that will be up the eos's last request.
@@ -192,6 +189,8 @@ class SinkBuffer { | |||
int64_t _first_send_time = -1; | |||
int64_t _last_receive_time = -1; | |||
int64_t _rpc_http_min_size = 0; | |||
|
|||
int64_t _sent_audit_stats_frequency = 127; |
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.
better to define a static const variable for 127?
Signed-off-by: Zhuhe Fang <fzhedu@gmail.com>
Signed-off-by: Zhuhe Fang <fzhedu@gmail.com>
[FE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[BE Incremental Coverage Report]❌ fail : 0 / 11 (00.00%) file detail
|
@mergify backport branch-2.5 |
✅ Backports have been created
|
@mergify backport branch-3.0 |
✅ Backports have been created
|
@mergify backport branch-3.1 |
✅ Backports have been created
|
@mergify backport branch-3.2 |
Signed-off-by: Zhuhe Fang <fzhedu@gmail.com> (cherry picked from commit cd07b2d) # Conflicts: # be/src/exec/pipeline/exchange/sink_buffer.cpp # be/src/runtime/runtime_state.cpp # be/src/runtime/runtime_state.h
Signed-off-by: Zhuhe Fang <fzhedu@gmail.com> (cherry picked from commit cd07b2d) # Conflicts: # be/src/runtime/runtime_state.cpp # be/src/runtime/runtime_state.h
Signed-off-by: Zhuhe Fang <fzhedu@gmail.com> (cherry picked from commit cd07b2d) # Conflicts: # be/src/runtime/runtime_state.cpp # be/src/runtime/runtime_state.h
✅ Backports have been created
|
Signed-off-by: Zhuhe Fang <fzhedu@gmail.com> (cherry picked from commit cd07b2d)
Signed-off-by: Zhuhe Fang <fzhedu@gmail.com> Signed-off-by: 张敢 <zhanggan@deepexi.com>
Signed-off-by: Zhuhe Fang <fzhedu@gmail.com>
Signed-off-by: Zhuhe Fang <fzhedu@gmail.com>
Why I'm doing:
sending audit stats for each chunk request takes 27% of time in high concurrent workloads.
What I'm doing:
reduce sending audit stats every
_sent_audit_stats_frequency
._sent_audit_stats_frequency = max(64, RoundUpToPowerOfTwo(fragment_ctx->num_drivers() * 4))), it is scale up with drivers' num. It help to know large query' audit stats even missing the last chunk.
the last chunk of exchange should sent audit stats.
results:
reduce 4% cost to null
Fixes #37082
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: