You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement a cluster status method, to know if workers are really running #11
Currently, we only know that we have submitted some jobs to a cluster scheduler. We don't know if these jobs are running or queued, or in any other state.
What do you think of implementing a kind of status method?
In the PBS case for example, it would issue a qstat call, and get the PBS scheduler status of every jobs handled by the Dask cluster.
Not sure if this is really needed, as we are able with the use of Dask Client to know the real size of the cluster (and maybe by some other means).
Maybe this issue is just about documenting how to retrieve the information about a cluster state, either by job scheduler (eg. PBS) API, either using Dask API.
Reacted by Julius Busecke, Ryan Abernathey, Joseph Jennings and Zeb Burke-Conte
I think this would be useful when using an autoscaling cluster. Particularly when jobs are waiting in the queue and the adaptive cluster is trying to decide if it should scale up/down.
changed the title [-]Implement a cluster status method, to now if worker are really running[/-][+]Implement a cluster status method, to know if workers are really running[/+]on Mar 27, 2018
I believe that cluster.workers is only a convention at this point. It's managed by the cluster object and so represents workers that have been asked for, but not workers that have connected. For the latter you would want the following:
Having cluster.workers be a dictionary mapping job id to a status in {'pending', 'running', 'finished'} might be nice. For some operations we'll want a mapping between job-id and address (like tcp://...) so that we know which job id corresponds to which worker. I suspect that the cleanest way to do this is to send the job-id through something like an environment variable or the --name keyword (we may already do this sometimes?)
I am using dask-jobqueue today for the first time. I find myself wishing I could check the status of the worker jobs from the notebook (rather than flipping back to the shell and running qstat). So I agree this would be a great feature.
In [15]: importdask_jobqueueIn [16]: cluster=dask_jobqueue.SLURMCluster(cores=1, processes=1)
In [17]: cluster.worker_specOut[17]: {}
In [18]: cluster.workersOut[18]: {}
In [19]: cluster.scale(2)
In [20]: cluster.workersOut[20]: {0: <SLURMJob: status=running>, 1: <SLURMJob: status=running>}
However, it appears that the reported information can be misleading sometimes. For instance, I am using a system which restricts the number of concurrent jobs to 35. When I submit 40 jobs, dask_jobqueue reports that all 40 workers are in running state even when some of the jobs are in pending state according to squeue:
dask-jobqueue reports all 40 workers to be in running state:
However, it appears that the reported information can be misleading sometimes. For instance, I am using a system which restricts the number of concurrent jobs to 35. When I submit 40 jobs, dask_jobqueue reports that all 40 workers are in running state even when some of the jobs are in pending state according to squeue:
I believe that cluster.workers is only a convention at this point. It's managed by the cluster object and so represents workers that have been asked for, but not workers that have connected. For the latter you would want the following:
cluster.scheduler.workers
In [26]: len(cluster.scheduler.workers)
Out[26]: 36
Activity
jhamman commentedon Mar 12, 2018
I think this would be useful when using an autoscaling cluster. Particularly when jobs are waiting in the queue and the adaptive cluster is trying to decide if it should scale up/down.
mrocklin commentedon Mar 12, 2018
[-]Implement a cluster status method, to now if worker are really running[/-][+]Implement a cluster status method, to know if workers are really running[/+]jhamman commentedon May 2, 2018
Is the following approach a dependable way of querying the cluster for the number of workers?
The next step would be to associate these workers with the job ids from pbs/slurm/etc.
mrocklin commentedon May 2, 2018
I believe that cluster.workers is only a convention at this point. It's managed by the cluster object and so represents workers that have been asked for, but not workers that have connected. For the latter you would want the following:
mrocklin commentedon May 2, 2018
Having cluster.workers be a dictionary mapping job id to a status in
{'pending', 'running', 'finished'}might be nice. For some operations we'll want a mapping between job-id and address (liketcp://...) so that we know which job id corresponds to which worker. I suspect that the cleanest way to do this is to send the job-id through something like an environment variable or the--namekeyword (we may already do this sometimes?)rabernat commentedon Jun 23, 2018
I am using dask-jobqueue today for the first time. I find myself wishing I could check the status of the worker jobs from the notebook (rather than flipping back to the shell and running
qstat). So I agree this would be a great feature.jhamman commentedon Jun 24, 2018
@rabernat - most of the hard work for this functionality is being done in #63. Stay tuned.
andersy005 commentedon Jul 8, 2020
This appears to have been addressed:
However, it appears that the reported information can be misleading sometimes. For instance, I am using a system which restricts the number of concurrent jobs to 35. When I submit 40 jobs,
dask_jobqueuereports that all 40 workers are inrunningstate even when some of the jobs are inpendingstate according tosqueue:dask-jobqueuereports all 40 workers to be inrunningstate:squeueshows some of the jobs to be inpendingstate:andersy005 commentedon Jul 8, 2020
Never mind ;)
I hadn't seen @mrocklin's comment
andersy005 commentedon Jul 8, 2020
I am curious... What needs to be done for this issue to be considered "fixed"? I'd happy to work on missing functionality.
mrocklin commentedon Jul 8, 2020