-
Notifications
You must be signed in to change notification settings - Fork 14
Support --threads and --workers on TPCH benchmarks
#130
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
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.
Great additional setting options. I am thinking about these as the follow-up PRs:
- Add (unit/integration) test to verify the the number of threads
- 🤔 : I know DF repartitions data per number of cores. Will the number of threads here represent that number of cores and automatically applied?
- 🤔 : Should we try to test number of partitions > number of threads and observe functional and performance behavior?
Note that this is just for benchmarks, which are some kind of tests by themselves. Users are not really able to use this benchmarking functionality in their programs.
I don't think so, DataFusion will still see the original number of cores in the machine, and it will repartition accordingly. The benchmarks allow passing a 🤔 Now that you mention it, if
We can do that now yes! we can do something like |
Another question, is it possible to add PARTITIONs to the |
I added a passthrough of the same arguments the example supports to the script. Now we can do: |
# Conflicts: # benchmarks/src/tpch/run.rs # benchmarks/src/util/memory.rs
Before, the distributed benchmarks where spawning a localhost worker in the same process as the benchmark itself, without applying any constraint to the resources used for either the localhost worker or the overall process.
This PR ships the ability to run workers as different processes with constrained resources and benchmark against them.
From the README.md:
Running TPCH benchmarks in distributed mode
Running the benchmarks in distributed mode implies:
The workers can be spawned by passing the
--spawn <port>flag, for example, for spawning 3 workers:With the three workers running in separate terminals, the TPCH benchmarks can be run in distributed mode with:
A good way of measuring the impact of distribution is to limit the physical threads each worker can use. For example,
it's expected that running 8 workers with 2 physical threads each one (8 * 2 = 16 total) is faster than running in
single-node with just 2 threads (1 * 3 = 2 total).
The
run.shscript already does this for you in a more ergonomic way: