1 worker with n threads vs n workers with 1 thread? #7516
-
Hello! Let's say I have a worker node with 64GB RAM and 8 cores and I want to utilize 7 cores for Dask workers. What would be likely the preferable setup?
Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Thanks for the question @joyofdata. The optimal number of threads vs. processes depends on the particular computation you're doing. In practice, "something in between" often works well (though this isn't always the case). I recommend checking out the following documentation sections: which outline some of the reasons why you might prefer more threads vs. more processes. Additionally, you may find the |
Beta Was this translation helpful? Give feedback.
Thanks for the question @joyofdata. The optimal number of threads vs. processes depends on the particular computation you're doing. In practice, "something in between" often works well (though this isn't always the case). I recommend checking out the following documentation sections:
which outline some of the reasons why you might prefer more threads vs. more processes.
Additionally, you may find the
nprocesses_nthreads
utility function useful. This is what Dask'sLocalCluster
uses to determine it's default number of workers and threads-per-worker.