dask: specify number of processes
You can use the num_workers
parameter to specify the number of processes for the compute
method.
results = compute(*delayed_values, scheduler='processes', num_workers=5)
you can configure it to use a custom process pool as such:
import dask
from multiprocessing.pool import Pool
dask.config.set(pool=Pool(5))
or as a context manager:
with dask.config.set(scheduler='processes', num_workers=5):
...
you may want to read this dask_scheduling
or my previous answer