You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR is based on #12537 and will need to remain in draft until that is merged. In addition, I'd like to fit in a few more builtin queries in this initial PR.
This PR creates a standalone query testing executable query_tester.
The tool takes a number of command line options today:
Usage: query_tester [options] query Positional arguments:
query name of the query to run [required]
Optional arguments:
-h --help shows help message and exits
-v --version prints version information and exits
--num-iterations [default: 1]
--cpu-threads size to use for the CPU thread pool, default controlled by Arrow
--io-threads size to use for the I/O thread pool, default controlled by Arrow
--validate if set the program will validate the query results [default: false] (not yet implemented)
The tool will first look for a Substrait query in the queries folder (there is an example of TPC-H Q1 in JSON format). At the moment this isn't very useful as our Substrait support is very limited.
The tool will then look for builtin queries, I'd like to add support for all of the TPC-H builtin queries.
There is a datasets folder that is also created. In the future I'd like to add support for downloading remote datasets to this folder.
The current output simply prints a few statistics:
(conbench3) pace@pace-desktop:~/dev/arrow/dev/qtester/debug-build$ ./query_tester tpch-1 --num-iterations 10
Average Duration: 1.19292s (+/- 0.00569406s)
Average Output Rows/S: 3.35311rps
Average Output Bytes/S: 409.08bps
Note that Output Rows/S and Output Bytes/S is not very useful for TPC-H queries (which aggregate most of their data so they have very little output for the amount of work done). I've prototyped adding a much more exhaustive breakdown of time spent by intercepting OT events but I'd like to save that work for a future PR.
The reason will be displayed to describe this comment to others. Learn more.
Yes, I created tpch1() by leveraging this. Once the PR adding tpch_benchmark.cc merges I will update this PR to remove tpch_benchmark.cc in favor of this (or perhaps keep the benchmark but link to builtin queries).
This PR modifies the `SubmitTask` and `Finish` methods of MapNode in `ExecPlan` to avoid scheduling extra thread tasks.
Performed the TPC-H Benchmark developed in PR #12537 with and without the changes.
```
TPC-H Benchmark (With Extra Thread Tasks)
-------------------------------------------------------------------
Benchmark Time CPU Iterations
-------------------------------------------------------------------
BM_Tpch_Q1/ScaleFactor:1 95035633 ns 178700 ns 100
TPC-H Benchmark (Without Extra Thread Tasks)
-------------------------------------------------------------------
Benchmark Time CPU Iterations
-------------------------------------------------------------------
BM_Tpch_Q1/ScaleFactor:1 91511754 ns 182060 ns 100
```
Also, tested with the Query Tester as proposed in PR #12586
```
With Thread Tasks (batch size = 4096)
./query_tester tpch-1
Average Duration: 0.106694s (+/- 0s)
Average Output Rows/S: 37.4902rps
Average Output Bytes/S: 4573.81bps
Without Thread Tasks (batch size = 4096)
./query_tester tpch-1
Average Duration: 0.104658s (+/- 0s)
Average Output Rows/S: 38.2198rps
Average Output Bytes/S: 4662.82bps
```
Closes#12720 from sanjibansg/thread_tasks
Authored-by: Sanjiban Sengupta <sanjiban.sg@gmail.com>
Signed-off-by: Weston Pace <weston.pace@gmail.com>
This file contains hidden or 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
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.
This PR is based on #12537 and will need to remain in draft until that is merged. In addition, I'd like to fit in a few more builtin queries in this initial PR.
This PR creates a standalone query testing executable query_tester.
The tool takes a number of command line options today:
The tool will first look for a Substrait query in the
queriesfolder (there is an example of TPC-H Q1 in JSON format). At the moment this isn't very useful as our Substrait support is very limited.The tool will then look for builtin queries, I'd like to add support for all of the TPC-H builtin queries.
There is a
datasetsfolder that is also created. In the future I'd like to add support for downloading remote datasets to this folder.The current output simply prints a few statistics:
Note that
Output Rows/SandOutput Bytes/Sis not very useful for TPC-H queries (which aggregate most of their data so they have very little output for the amount of work done). I've prototyped adding a much more exhaustive breakdown of time spent by intercepting OT events but I'd like to save that work for a future PR.