Skip to content
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

DOC: Document threads_per_worker #7181

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion distributed/deploy/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ class LocalCluster(SpecCluster):
Whether to use processes (True) or threads (False). Defaults to True, unless
worker_class=Worker, in which case it defaults to False.
threads_per_worker: int
Number of threads per each worker
The number of threads in each worker's
:class:`python:ThreadPoolExecutor` where tasks are executed.
See also :doc:`dask:array-best-practices` for more information.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem like the right place to point to array best practices docs.

Suggested change
See also :doc:`dask:array-best-practices` for more information.

I'm also wondering if this is still an issue since recent versions of distributed should limit numpys concurrency by default

# Numpy configuration
OMP_NUM_THREADS: 1
MKL_NUM_THREADS: 1
OPENBLAS_NUM_THREADS: 1

In dask/dask#9588 you mentioned you're using dask=2022.05.0 -- I'm curious if you run into the same thread oversubscription issue with the latest dask=2022.10.0 release

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem like the right place to point to array best practices docs.

How about Notes instead? It would be nice to have it in this class docstring somewhere so that people thinking about threads can find complementary information. I would have found the link I think if it had been on the same page as threads_per_worker somewhere...

I'm also wondering if this is still an issue since recent versions of distributed should limit numpys concurrency by default

Based on a similar suggestion/question earlier from @ncclementi I checked and indeed it's fixed for me in 2022.10.0 :)

scheduler_port: int
Port of the scheduler. 8786 by default, use 0 to choose a random port
silence_logs: logging level
Expand Down
2 changes: 1 addition & 1 deletion docs/source/killed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Specifically for connectivity problems (e.g., timeout exceptions in the worker
logs), you will need to diagnose your networking infrastructure, which is more
complicated than can be described here. Commonly, it may involve logging into
the machine running the affected worker
(although you can :ref:`ipylaunch`).
(although you can ``ipylaunch``).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time to clean this up 👍


Killed by Nanny
'''''''''''''''
Expand Down
2 changes: 2 additions & 0 deletions docs/source/queues.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:orphan:

Data Streams with Queues
========================

Expand Down