Skip to content

Commit

Permalink
Add note about limiting thread oversubscription by default (#9592)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbourbeau committed Oct 25, 2022
1 parent 4a350fc commit 6e7c49f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/source/array-best-practices.rst
Expand Up @@ -66,6 +66,13 @@ Note that if you provide ``chunks='auto'`` then Dask Array will look for a
Avoid Oversubscribing Threads
-----------------------------

.. tip::

When using the ``distributed`` scheduler, the ``OMP_NUM_THREADS``,
``MKL_NUM_THREADS``, and ``OPENBLAS_NUM_THREADS`` environment variables
are automatically set to ``1`` when using :ref:`nanny` workers.
This helps avoid oversubscribing threads in common cases.

By default Dask will run as many concurrent tasks as you have logical cores.
It assumes that each task will consume about one core. However, many
array-computing libraries are themselves multi-threaded, which can cause
Expand Down
2 changes: 2 additions & 0 deletions docs/source/deploying-python-advanced.rst
Expand Up @@ -166,6 +166,8 @@ In this example we don't wait on ``s.finished()``, so this will terminate
relatively quickly. You could have called ``await s.finished()`` though if you
wanted this to run forever.

.. _nanny:

Nanny
-----

Expand Down

0 comments on commit 6e7c49f

Please sign in to comment.