Skip to content

1 worker with n threads vs n workers with 1 thread? #7516

Answered by jrbourbeau
joyofdata asked this question in Q&A
Discussion options

You must be logged in to vote

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's LocalCluster uses to determine it's default number of workers and threads-per-worker.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by joyofdata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants