-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Improve operator tracing and make it E2E work #11360
Conversation
✅ Deploy Preview for meta-velox canceled.
|
This pull request was exported from Phabricator. Differential Revision: D64946367 |
This pull request was exported from Phabricator. Differential Revision: D64946367 |
…ator#11360) Summary: Pull Request resolved: facebookincubator#11360 Differential Revision: D64946367
97750ba
to
9f00ded
Compare
This pull request was exported from Phabricator. Differential Revision: D64946367 |
…ator#11360) Summary: Pull Request resolved: facebookincubator#11360 Differential Revision: D64946367
9f00ded
to
39d7f55
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.
@xiaoxmeng LGTM, thanks for your refactor.
This pull request was exported from Phabricator. Differential Revision: D64946367 |
39d7f55
to
39873ce
Compare
Summary: Pull Request resolved: facebookincubator#11360 This PR improves the operator trace framework and replay tool implementation: (1) Let driver execution framework to handle the trace input collection and summary file generation. The finish trace is either called when trace limit exceeds or on operator close instead of no more input. So it can capture more information in summary like peak memory usage. By removing the trace input collection into the driver framework it eases the trace input collection for a spilling operator. We add to capture the peak memory and input rows in summary so it helps identify the hot operator or task on replay debugging. (2) Change the trace storage layout to have root with query id for traces from different tasks (3) Abstract the replay tool function into TraceReplayRunner class and derive in Meta internal code repo to handle the Meta internal env setup and keep most common part in TraceReplayRunner for OSS (4) A couple of fixes in trace replay tool to make it E2E function in Meta for table writer use case (5) A couple of file/class renaming to make the file/class name to be more specific as currently we only support operator level trace collection and replay Differential Revision: D64946367
This pull request was exported from Phabricator. Differential Revision: D64946367 |
Summary: Pull Request resolved: facebookincubator#11360 This PR improves the operator trace framework and replay tool implementation: (1) Let driver execution framework to handle the trace input collection and summary file generation. The finish trace is either called when trace limit exceeds or on operator close instead of no more input. So it can capture more information in summary like peak memory usage. By removing the trace input collection into the driver framework it eases the trace input collection for a spilling operator. We add to capture the peak memory and input rows in summary so it helps identify the hot operator or task on replay debugging. (2) Change the trace storage layout to have root with query id for traces from different tasks (3) Abstract the replay tool function into TraceReplayRunner class and derive in Meta internal code repo to handle the Meta internal env setup and keep most common part in TraceReplayRunner for OSS (4) A couple of fixes in trace replay tool to make it E2E function in Meta for table writer use case (5) A couple of file/class renaming to make the file/class name to be more specific as currently we only support operator level trace collection and replay Differential Revision: D64946367
39873ce
to
4117e6f
Compare
This pull request was exported from Phabricator. Differential Revision: D64946367 |
Summary: Pull Request resolved: facebookincubator#11360 This PR improves the operator trace framework and replay tool implementation: (1) Let driver execution framework to handle the trace input collection and summary file generation. The finish trace is either called when trace limit exceeds or on operator close instead of no more input. So it can capture more information in summary like peak memory usage. By removing the trace input collection into the driver framework it eases the trace input collection for a spilling operator. We add to capture the peak memory and input rows in summary so it helps identify the hot operator or task on replay debugging. (2) Change the trace storage layout to have root with query id for traces from different tasks (3) Abstract the replay tool function into TraceReplayRunner class and derive in Meta internal code repo to handle the Meta internal env setup and keep most common part in TraceReplayRunner for OSS (4) A couple of fixes in trace replay tool to make it E2E function in Meta for table writer use case (5) A couple of file/class renaming to make the file/class name to be more specific as currently we only support operator level trace collection and replay Differential Revision: D64946367
4117e6f
to
586949b
Compare
@@ -29,6 +30,52 @@ namespace facebook::velox::exec::trace { | |||
/// Creates a directory to store the query trace metdata and data. | |||
void createTraceDirectory(const std::string& traceDir); | |||
|
|||
/// Returns the trace directory for a given query. | |||
std::string getQueryTraceDirectory( |
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.
s/get/compose/
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.
I will keep it as get
const std::string& queryId); | ||
|
||
/// Returns the trace directory for a given query task. | ||
std::string getTaskTraceDirectory( |
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.
ditto, and below
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.
Thanks for the refactoring, LGTM
586949b
to
6dbf3dd
Compare
Summary: Pull Request resolved: facebookincubator#11360 This PR improves the operator trace framework and replay tool implementation: (1) Let driver execution framework to handle the trace input collection and summary file generation. The finish trace is either called when trace limit exceeds or on operator close instead of no more input. So it can capture more information in summary like peak memory usage. By removing the trace input collection into the driver framework it eases the trace input collection for a spilling operator. We add to capture the peak memory and input rows in summary so it helps identify the hot operator or task on replay debugging. (2) Change the trace storage layout to have root with query id for traces from different tasks (3) Abstract the replay tool function into TraceReplayRunner class and derive in Meta internal code repo to handle the Meta internal env setup and keep most common part in TraceReplayRunner for OSS (4) A couple of fixes in trace replay tool to make it E2E function in Meta for table writer use case (5) A couple of file/class renaming to make the file/class name to be more specific as currently we only support operator level trace collection and replay Reviewed By: tanjialiang Differential Revision: D64946367
This pull request was exported from Phabricator. Differential Revision: D64946367 |
Summary: Pull Request resolved: facebookincubator#11360 This PR improves the operator trace framework and replay tool implementation: (1) Let driver execution framework to handle the trace input collection and summary file generation. The finish trace is either called when trace limit exceeds or on operator close instead of no more input. So it can capture more information in summary like peak memory usage. By removing the trace input collection into the driver framework it eases the trace input collection for a spilling operator. We add to capture the peak memory and input rows in summary so it helps identify the hot operator or task on replay debugging. (2) Change the trace storage layout to have root with query id for traces from different tasks (3) Abstract the replay tool function into TraceReplayRunner class and derive in Meta internal code repo to handle the Meta internal env setup and keep most common part in TraceReplayRunner for OSS (4) A couple of fixes in trace replay tool to make it E2E function in Meta for table writer use case (5) A couple of file/class renaming to make the file/class name to be more specific as currently we only support operator level trace collection and replay Reviewed By: tanjialiang Differential Revision: D64946367
8ac3433
to
fed3960
Compare
This pull request was exported from Phabricator. Differential Revision: D64946367 |
Summary: Pull Request resolved: facebookincubator#11360 This PR improves the operator trace framework and replay tool implementation: (1) Let driver execution framework to handle the trace input collection and summary file generation. The finish trace is either called when trace limit exceeds or on operator close instead of no more input. So it can capture more information in summary like peak memory usage. By removing the trace input collection into the driver framework it eases the trace input collection for a spilling operator. We add to capture the peak memory and input rows in summary so it helps identify the hot operator or task on replay debugging. (2) Change the trace storage layout to have root with query id for traces from different tasks (3) Abstract the replay tool function into TraceReplayRunner class and derive in Meta internal code repo to handle the Meta internal env setup and keep most common part in TraceReplayRunner for OSS (4) A couple of fixes in trace replay tool to make it E2E function in Meta for table writer use case (5) A couple of file/class renaming to make the file/class name to be more specific as currently we only support operator level trace collection and replay Reviewed By: tanjialiang Differential Revision: D64946367
fed3960
to
aa9ee2e
Compare
This pull request was exported from Phabricator. Differential Revision: D64946367 |
Summary: Pull Request resolved: facebookincubator#11360 This PR improves the operator trace framework and replay tool implementation: (1) Let driver execution framework to handle the trace input collection and summary file generation. The finish trace is either called when trace limit exceeds or on operator close instead of no more input. So it can capture more information in summary like peak memory usage. By removing the trace input collection into the driver framework it eases the trace input collection for a spilling operator. We add to capture the peak memory and input rows in summary so it helps identify the hot operator or task on replay debugging. (2) Change the trace storage layout to have root with query id for traces from different tasks (3) Abstract the replay tool function into TraceReplayRunner class and derive in Meta internal code repo to handle the Meta internal env setup and keep most common part in TraceReplayRunner for OSS (4) A couple of fixes in trace replay tool to make it E2E function in Meta for table writer use case (5) A couple of file/class renaming to make the file/class name to be more specific as currently we only support operator level trace collection and replay Reviewed By: tanjialiang Differential Revision: D64946367
aa9ee2e
to
b31b1e0
Compare
Summary: Pull Request resolved: facebookincubator#11360 This PR improves the operator trace framework and replay tool implementation: (1) Let driver execution framework to handle the trace input collection and summary file generation. The finish trace is either called when trace limit exceeds or on operator close instead of no more input. So it can capture more information in summary like peak memory usage. By removing the trace input collection into the driver framework it eases the trace input collection for a spilling operator. We add to capture the peak memory and input rows in summary so it helps identify the hot operator or task on replay debugging. (2) Change the trace storage layout to have root with query id for traces from different tasks (3) Abstract the replay tool function into TraceReplayRunner class and derive in Meta internal code repo to handle the Meta internal env setup and keep most common part in TraceReplayRunner for OSS (4) A couple of fixes in trace replay tool to make it E2E function in Meta for table writer use case (5) Simplify the trace control logic by throwing if hit trace limit instead of logging in trace summary. (6) Strict the check if trace plan not is not specified or has specified the wrong node as we are only supposed to use trace for debugging purpose instead of production query running. (7) A couple of file/class renaming to make the file/class name to be more specific as currently we only support operator level trace collection and replay Reviewed By: tanjialiang Differential Revision: D64946367
This pull request was exported from Phabricator. Differential Revision: D64946367 |
b31b1e0
to
28cf060
Compare
This pull request was exported from Phabricator. Differential Revision: D64946367 |
Summary: Pull Request resolved: facebookincubator#11360 This PR improves the operator trace framework and replay tool implementation: (1) Let driver execution framework to handle the trace input collection and summary file generation. The finish trace is either called when trace limit exceeds or on operator close instead of no more input. So it can capture more information in summary like peak memory usage. By removing the trace input collection into the driver framework it eases the trace input collection for a spilling operator. We add to capture the peak memory and input rows in summary so it helps identify the hot operator or task on replay debugging. (2) Change the trace storage layout to have root with query id for traces from different tasks (3) Abstract the replay tool function into TraceReplayRunner class and derive in Meta internal code repo to handle the Meta internal env setup and keep most common part in TraceReplayRunner for OSS (4) A couple of fixes in trace replay tool to make it E2E function in Meta for table writer use case (5) Simplify the trace control logic by throwing if hit trace limit instead of logging in trace summary. (6) Strict the check if trace plan not is not specified or has specified the wrong node as we are only supposed to use trace for debugging purpose instead of production query running. (7) A couple of file/class renaming to make the file/class name to be more specific as currently we only support operator level trace collection and replay Reviewed By: tanjialiang Differential Revision: D64946367
28cf060
to
c0844e2
Compare
This pull request was exported from Phabricator. Differential Revision: D64946367 |
Summary: Pull Request resolved: facebookincubator#11360 This PR improves the operator trace framework and replay tool implementation: (1) Let driver execution framework to handle the trace input collection and summary file generation. The finish trace is either called when trace limit exceeds or on operator close instead of no more input. So it can capture more information in summary like peak memory usage. By removing the trace input collection into the driver framework it eases the trace input collection for a spilling operator. We add to capture the peak memory and input rows in summary so it helps identify the hot operator or task on replay debugging. (2) Change the trace storage layout to have root with query id for traces from different tasks (3) Abstract the replay tool function into TraceReplayRunner class and derive in Meta internal code repo to handle the Meta internal env setup and keep most common part in TraceReplayRunner for OSS (4) A couple of fixes in trace replay tool to make it E2E function in Meta for table writer use case (5) Simplify the trace control logic by throwing if hit trace limit instead of logging in trace summary. (6) Strict the check if trace plan not is not specified or has specified the wrong node as we are only supposed to use trace for debugging purpose instead of production query running. (7) A couple of file/class renaming to make the file/class name to be more specific as currently we only support operator level trace collection and replay Reviewed By: tanjialiang Differential Revision: D64946367
c0844e2
to
8704d7a
Compare
Summary: Pull Request resolved: facebookincubator#11360 This PR improves the operator trace framework and replay tool implementation: (1) Let driver execution framework to handle the trace input collection and summary file generation. The finish trace is either called when trace limit exceeds or on operator close instead of no more input. So it can capture more information in summary like peak memory usage. By removing the trace input collection into the driver framework it eases the trace input collection for a spilling operator. We add to capture the peak memory and input rows in summary so it helps identify the hot operator or task on replay debugging. (2) Change the trace storage layout to have root with query id for traces from different tasks (3) Abstract the replay tool function into TraceReplayRunner class and derive in Meta internal code repo to handle the Meta internal env setup and keep most common part in TraceReplayRunner for OSS (4) A couple of fixes in trace replay tool to make it E2E function in Meta for table writer use case (5) Simplify the trace control logic by throwing if hit trace limit instead of logging in trace summary. (6) Strict the check if trace plan not is not specified or has specified the wrong node as we are only supposed to use trace for debugging purpose instead of production query running. (7) A couple of file/class renaming to make the file/class name to be more specific as currently we only support operator level trace collection and replay Reviewed By: tanjialiang Differential Revision: D64946367
8704d7a
to
9086caa
Compare
This pull request was exported from Phabricator. Differential Revision: D64946367 |
Summary: Pull Request resolved: facebookincubator#11360 This PR improves the operator trace framework and replay tool implementation: (1) Let driver execution framework to handle the trace input collection and summary file generation. The finish trace is either called when trace limit exceeds or on operator close instead of no more input. So it can capture more information in summary like peak memory usage. By removing the trace input collection into the driver framework it eases the trace input collection for a spilling operator. We add to capture the peak memory and input rows in summary so it helps identify the hot operator or task on replay debugging. (2) Change the trace storage layout to have root with query id for traces from different tasks (3) Abstract the replay tool function into TraceReplayRunner class and derive in Meta internal code repo to handle the Meta internal env setup and keep most common part in TraceReplayRunner for OSS (4) A couple of fixes in trace replay tool to make it E2E function in Meta for table writer use case (5) Simplify the trace control logic by throwing if hit trace limit instead of logging in trace summary. (6) Strict the check if trace plan not is not specified or has specified the wrong node as we are only supposed to use trace for debugging purpose instead of production query running. (7) A couple of file/class renaming to make the file/class name to be more specific as currently we only support operator level trace collection and replay Reviewed By: tanjialiang Differential Revision: D64946367
9086caa
to
7994bda
Compare
This pull request was exported from Phabricator. Differential Revision: D64946367 |
This pull request has been merged in df5cff5. |
Conbench analyzed the 1 benchmark run on commit There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
Summary: A follow-up fix PR for #11360 to address the linking error: ```cmake [1432/1435] Linking CXX executable velox/tool/trace/velox_query_replayer FAILED: velox/tool/trace/velox_query_replayer ... Undefined symbols for architecture arm64: "facebook::velox::tool::trace::TraceReplayRunner::run()", referenced from: _main in TraceReplayerMain.cpp.o "facebook::velox::tool::trace::TraceReplayRunner::init()", referenced from: _main in TraceReplayerMain.cpp.o "facebook::velox::tool::trace::TraceReplayRunner::TraceReplayRunner()", referenced from: _main in TraceReplayerMain.cpp.o "vtable for facebook::velox::tool::trace::TraceReplayRunner", referenced from: Reviewed By: xiaoxmeng Differential Revision: D65217021 Pulled By: kgpai fbshipit-source-id: 2e0e44d916a27853366d77d883f0add70993fdc0
Differential Revision: D64946367
This PR improves the operator trace framework and replay tool implementation:
(1) Let driver execution framework to handle the trace input collection and summary file generation.
The finish trace is either called when trace limit exceeds or on operator close instead of no
more input. So it can capture more information in summary like peak memory usage. By removing
the trace input collection into the driver framework it eases the trace input collection for a spilling
operator. We add to capture the peak memory and input rows in summary so it helps identify the
hot operator or task on replay debugging.
(2) Change the trace storage layout to have root with query id for traces from different tasks
(3) Abstract the replay tool function into TraceReplayRunner class and derive in Meta internal code repo
to handle the Meta internal env setup and keep most common part in TraceReplayRunner for OSS
(4) A couple of fixes in trace replay tool to make it E2E function in Meta for table writer use case
(5) A couple of file/class renaming to make the file/class name to be more specific as currently we only
support operator level trace collection and replay