dask-drmaa icon indicating copy to clipboard operation
dask-drmaa copied to clipboard

Closing all workers

Open jakirkham opened this issue 7 years ago • 2 comments

In cases where there are lots of workers stop_workers is slow. This appears to be caused by closing each worker in a for-loop.

As the common case where multiple workers are submitted to be stopped is just submitting all workers to stop, it would be good to special case this and pass JOB_IDS_SESSION_ALL to DRMAA. This would bypass the need for the loop.

There are a few options:

  1. Detect if all workers were passed in (easy, maybe a little hacky)
  2. Make the worker_ids parameter optional and the default value equal to all workers (easy, straightforward)
  3. Integrate this into close (easy, hacky without 1 or 2)
  4. Background the task somehow using threads, dask.delayed, or similar (may need a few tricks depending)

Thoughts?

jakirkham avatar Jun 22 '18 18:06 jakirkham

Should add we need to take PR ( https://github.com/dask/dask-drmaa/pull/85 ) into account. So this would affect scale_down in a similar way.

jakirkham avatar Jun 22 '18 18:06 jakirkham

cc @d-v-b

jakirkham avatar Jun 22 '18 18:06 jakirkham