-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Enhancement] Support profile for only big query #33825
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
liuyehcf
changed the title
[Enhancement] Support profile only for long-running profile
[Enhancement] Support profile for only big query
Oct 30, 2023
kangkaisen
reviewed
Oct 30, 2023
Signed-off-by: liuyehcf <[email protected]>
liuyehcf
force-pushed
the
profile
branch
2 times, most recently
from
October 30, 2023 09:08
7dd9145
to
7c81810
Compare
Signed-off-by: liuyehcf <[email protected]>
Kudos, SonarCloud Quality Gate passed! |
kangkaisen
approved these changes
Oct 30, 2023
[FE Incremental Coverage Report]❌ fail : 21 / 30 (70.00%) file detail
|
[BE Incremental Coverage Report]❌ fail : 4 / 10 (40.00%) file detail
|
Seaven
approved these changes
Oct 30, 2023
@Mergifyio backport branch-3.2 |
@Mergifyio backport branch-3.1 |
✅ Backports have been created
|
mergify bot
pushed a commit
that referenced
this pull request
Oct 30, 2023
Signed-off-by: liuyehcf <[email protected]> (cherry picked from commit 0e2d056) # Conflicts: # gensrc/thrift/InternalService.thrift
✅ Backports have been created
|
mergify bot
pushed a commit
that referenced
this pull request
Oct 30, 2023
Signed-off-by: liuyehcf <[email protected]> (cherry picked from commit 0e2d056) # Conflicts: # fe/fe-core/src/main/java/com/starrocks/common/profile/Tracers.java # fe/fe-core/src/main/java/com/starrocks/qe/DefaultCoordinator.java # fe/fe-core/src/main/java/com/starrocks/qe/StmtExecutor.java # fe/fe-core/src/main/java/com/starrocks/qe/scheduler/Coordinator.java # fe/fe-core/src/main/java/com/starrocks/qe/scheduler/QueryRuntimeProfile.java # fe/fe-core/src/main/java/com/starrocks/qe/scheduler/dag/JobSpec.java # gensrc/thrift/InternalService.thrift
wanpengfei-git
pushed a commit
that referenced
this pull request
Oct 30, 2023
Signed-off-by: liuyehcf <[email protected]> (cherry picked from commit 0e2d056) # Conflicts: # gensrc/thrift/InternalService.thrift
wanpengfei-git
pushed a commit
that referenced
this pull request
Oct 31, 2023
Signed-off-by: liuyehcf <[email protected]> (cherry picked from commit 0e2d056) # Conflicts: # fe/fe-core/src/main/java/com/starrocks/common/profile/Tracers.java # fe/fe-core/src/main/java/com/starrocks/qe/DefaultCoordinator.java # fe/fe-core/src/main/java/com/starrocks/qe/StmtExecutor.java # fe/fe-core/src/main/java/com/starrocks/qe/scheduler/Coordinator.java # fe/fe-core/src/main/java/com/starrocks/qe/scheduler/QueryRuntimeProfile.java # fe/fe-core/src/main/java/com/starrocks/qe/scheduler/dag/JobSpec.java # gensrc/thrift/InternalService.thrift
@Mergifyio backport branch-2.5 |
✅ Backports have been created
|
@Mergifyio backport branch-3.0 |
✅ Backports have been created
|
mergify bot
pushed a commit
that referenced
this pull request
Oct 31, 2023
Signed-off-by: liuyehcf <[email protected]> (cherry picked from commit 0e2d056) # Conflicts: # be/src/exec/pipeline/query_context.h # fe/fe-core/src/main/java/com/starrocks/common/profile/Tracers.java # fe/fe-core/src/main/java/com/starrocks/load/loadv2/LoadLoadingTask.java # fe/fe-core/src/main/java/com/starrocks/load/streamload/StreamLoadTask.java # fe/fe-core/src/main/java/com/starrocks/qe/ConnectContext.java # fe/fe-core/src/main/java/com/starrocks/qe/DefaultCoordinator.java # fe/fe-core/src/main/java/com/starrocks/qe/SessionVariable.java # fe/fe-core/src/main/java/com/starrocks/qe/StmtExecutor.java # fe/fe-core/src/main/java/com/starrocks/qe/scheduler/Coordinator.java # fe/fe-core/src/main/java/com/starrocks/qe/scheduler/QueryRuntimeProfile.java # fe/fe-core/src/main/java/com/starrocks/qe/scheduler/dag/JobSpec.java # gensrc/thrift/InternalService.thrift
mergify bot
pushed a commit
that referenced
this pull request
Oct 31, 2023
Signed-off-by: liuyehcf <[email protected]> (cherry picked from commit 0e2d056) # Conflicts: # be/src/exec/pipeline/query_context.h # fe/fe-core/src/main/java/com/starrocks/common/profile/Tracers.java # fe/fe-core/src/main/java/com/starrocks/load/loadv2/LoadLoadingTask.java # fe/fe-core/src/main/java/com/starrocks/load/streamload/StreamLoadTask.java # fe/fe-core/src/main/java/com/starrocks/qe/DefaultCoordinator.java # fe/fe-core/src/main/java/com/starrocks/qe/SessionVariable.java # fe/fe-core/src/main/java/com/starrocks/qe/StmtExecutor.java # fe/fe-core/src/main/java/com/starrocks/qe/scheduler/Coordinator.java # fe/fe-core/src/main/java/com/starrocks/qe/scheduler/QueryRuntimeProfile.java # fe/fe-core/src/main/java/com/starrocks/qe/scheduler/dag/JobSpec.java # gensrc/thrift/InternalService.thrift
wanpengfei-git
pushed a commit
that referenced
this pull request
Oct 31, 2023
Signed-off-by: liuyehcf <[email protected]> (cherry picked from commit 0e2d056) # Conflicts: # be/src/exec/pipeline/query_context.h # fe/fe-core/src/main/java/com/starrocks/common/profile/Tracers.java # fe/fe-core/src/main/java/com/starrocks/load/loadv2/LoadLoadingTask.java # fe/fe-core/src/main/java/com/starrocks/load/streamload/StreamLoadTask.java # fe/fe-core/src/main/java/com/starrocks/qe/ConnectContext.java # fe/fe-core/src/main/java/com/starrocks/qe/DefaultCoordinator.java # fe/fe-core/src/main/java/com/starrocks/qe/SessionVariable.java # fe/fe-core/src/main/java/com/starrocks/qe/StmtExecutor.java # fe/fe-core/src/main/java/com/starrocks/qe/scheduler/Coordinator.java # fe/fe-core/src/main/java/com/starrocks/qe/scheduler/QueryRuntimeProfile.java # fe/fe-core/src/main/java/com/starrocks/qe/scheduler/dag/JobSpec.java # gensrc/thrift/InternalService.thrift
wanpengfei-git
pushed a commit
that referenced
this pull request
Oct 31, 2023
Signed-off-by: liuyehcf <[email protected]> (cherry picked from commit 0e2d056) # Conflicts: # be/src/exec/pipeline/query_context.h # fe/fe-core/src/main/java/com/starrocks/common/profile/Tracers.java # fe/fe-core/src/main/java/com/starrocks/load/loadv2/LoadLoadingTask.java # fe/fe-core/src/main/java/com/starrocks/load/streamload/StreamLoadTask.java # fe/fe-core/src/main/java/com/starrocks/qe/DefaultCoordinator.java # fe/fe-core/src/main/java/com/starrocks/qe/SessionVariable.java # fe/fe-core/src/main/java/com/starrocks/qe/StmtExecutor.java # fe/fe-core/src/main/java/com/starrocks/qe/scheduler/Coordinator.java # fe/fe-core/src/main/java/com/starrocks/qe/scheduler/QueryRuntimeProfile.java # fe/fe-core/src/main/java/com/starrocks/qe/scheduler/dag/JobSpec.java # gensrc/thrift/InternalService.thrift
liuyehcf
added a commit
to liuyehcf/starrocks
that referenced
this pull request
Nov 1, 2023
Signed-off-by: liuyehcf <[email protected]> (cherry picked from commit 0e2d056)
liuyehcf
added a commit
to liuyehcf/starrocks
that referenced
this pull request
Nov 1, 2023
Signed-off-by: liuyehcf <[email protected]> (cherry picked from commit 0e2d056)
version >=3.0.8 or >=3.1.5 |
23 tasks
This was referenced Jan 29, 2024
This was referenced Jan 29, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
In practical system, we won't enable the profile, because this feature may have significant overhead and may lead to decrease in performance. But some slow query may occur on a regular basis, and we want to get the profile of those queries, which is not supported in our system currently.
How
In this pr, we offer an additional session variable, namely
big_query_profile_second_threshold
, to enable only the slow query.And here's how it works:
enable_profile=true
, than the added variable is simply ignored.enable_profile=false
andbig_query_profile_second_threshold > 0
. Backend will process profile and report profile if overall time exceed the threshold(defined bybig_query_profile_second_threshold
). And frontend will finally decide whether the profile will be displayed or not based on the comparation between the overall query time andbig_query_profile_second_threshold
, if the overall query time is greater then the value ofbig_query_profile_second_threshold
, the profile can be seen, otherwise not.Limitation
A large query might consist of several fragment instances. Some of these instances finish quickly after execution starts, while others may take several minutes. Only those fragment instances that last longer than the
bigQueryProfileSecondThreshold
will report their profiles. This results in an incomplete profile that includes only the most time-consuming partsExample
https://gist.github.com/liuyehcf/a4ec577d188622cf16d324d0491e6e69
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: