Skip to content

Adaptive prematurely killing workers #126

Closed

Description

@josephhardinee

I think this may be related to #122 but not sure so I'll post it as it's own issue.

When I start up a PBS cluster with adaptive, it starts up the minimum number of workers, but then kills all of them after about 10 seconds. This is not the case if I scale without using adaptive. I'm attaching a notebook to show a simple example and other information.

Adaptive Example

Activity

  1. guillaumeeb commented on Aug 14, 2018

    @guillaumeeb
    Member

    I think I got this one. If you're using master branch, argument to scale or to adaptive are not the number of job to launch anymore, but the number of worker processes to launch.

    So in your example, you've apparently configured dask-jobqueue to launch workers by group of 6. When you tell adaptive to adapt from 2 to 4, it may have trouble chosing between 0 or 1 job.

    But wait, this is weird as you seem to have 2 jobs started in both of your example, with adapt or scale. So I take it you're not using master branch, and probably latest release from pip or conda? In that case, adaptive in that release is probably broken, as IIRC #63 was not in.

    I will open another issue for preparing a new release.

  2. josephhardinee commented on Aug 14, 2018

    @josephhardinee
    ContributorAuthor

    Good news and bad news. I switched to master and it does indeed fix the issue. Jobs are now submitted and it also does keep it at the minimum as jobs die due to scheduler.

    It also introduced another issue though it seems. Now it appears the interface configuration option is ignored from the yaml file. I have it set to ib0, but it starts the scheduler listening on eth0 (and also tells the workers that is where they should connect). If I explicitly pass in ip='xxx.xxx.xxx.xxx' for the ib0 interface to the PBSCluster call then they are able to connect correctly.

    The job script it is submitting is:

    /home/josephhardinee/.conda/envs/py3/bin/python -m distributed.cli.dask_worker tcp://172.23.82.82:44232 --nthreads 5 --nprocs 6 --memory-limit 45.00GB --name dask-worker-joe--${JOB_ID}-- --death-timeout 60 --local-directory $localscratch --interface  ib0 

    the address 172.23.82.82 corresponds to eth0.239.

    Is there an equivalent of --interface that i can pass to kwargs on the Cluster to tell the scheduler what to listen on?

  3. guillaumeeb commented on Aug 14, 2018

    @guillaumeeb
    Member

    With #119, scheduler now listen to any network interface by default. So interface parameters is indeed ignored for scheduler binding, it is however taken into account for workers. That should not be a problem, given that scheduler should be listening on your ib0 interface too.

    If you still need to tell the scheduler to listen on a specific interface, the only solution currently is the one you propose: use ip= kwarg to the PBSCluster call. You can get the IP programmatically if needed, this is what was done in dask-jobqueue 0.3.0.

    Reading more carefully your comment, I don't know what is the impact of worker connecting to scheduler with eth0 and then using ib0 interface. @mrocklin will certainly be more knowledgeable, #119 may have introduced an issue. Will this affect communication performances between workers and scheduler? Or will the --interface options force the worker to communicate through ib0 with scheduler as with other workers?

  4. josephhardinee commented on Aug 14, 2018

    @josephhardinee
    ContributorAuthor

    Well the bigger issue I'm running into here is that I believe there are two separate networks. So the IP address that is being passed to the worker to connect to, is not actually accessible by the worker.

  5. guillaumeeb commented on Aug 15, 2018

    @guillaumeeb
    Member

    Hm, that's a problem I did not forsee in #119. I believe when given empty ip kwargs, scheduler bind to all interfaces, but takes the first one it sees as a display attribute.

    We should probably override the default address attribute in case interface kwarg is given, so do something around here:

    self._command_template = ' '.join([dask_worker_command, self.scheduler.address])

  6. guillaumeeb commented on Aug 24, 2018

    @guillaumeeb
    Member

    @josephhardinee, if you find time to give a go to last updates in master branch, your problem should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions