Skip to content

Handling workers with expiring allocation requests #122

Closed
dask/distributed
#2844

Description

@wgustafson

I am trying to figure out how to handle the case of dask workers getting bumped from a cluster due to their requested allocation time expiring. From the intro YouTube video at https://www.youtube.com/watch?v=FXsgmwpRExM, it sounds like dask-jobqueue should detect when a worker expires and automatically start a replacement, which is what I want. However, my testing on DOE's edison computer at NERSC is not getting that behavior. If it matters, edison uses SLURM.

I have tried setting up my cluster two ways and both behave the same. I start a worker that uses dask.delayed to do a bunch of embarrassingly parallel tasks, the server spawns one worker, that worker does the first task or two, the worker expires, the server seems to hang, and nothing else happens.

The first approach I used to setup the cluster was with "scale":

    cluster = SLURMCluster(cores=1, processes=1)  # need all the memory for one task
    cluster.scale(1)  # testing with as simple as I can get, cycling 1 worker
    client = Client(cluster, timeout='45s')

@josephhardinee suggested a 2nd approach using "adapt" instead:

    cluster = SLURMCluster(cores=1, processes=1)  # need all the memory for one task
    cluster.adapt(minimum=1, maximum=1)  # trying adapt instead of scale
    client = Client(cluster, timeout='45s')

The dask-worker.err log concludes with:

slurmstepd: error: *** JOB 10234215 ON nid01242 CANCELLED AT 2018-08-10T13:25:30 DUE TO TIME LIMIT ***
distributed.dask_worker - INFO - Exiting on signal 15
distributed.nanny - INFO - Closing Nanny at 'tcp://10.128.4.227:35634'
distributed.dask_worker - INFO - Exiting on signal 15
distributed.dask_worker - INFO - End worker
distributed.process - WARNING - reaping stray process <ForkServerProcess(ForkServerProcess-1, started daemon)>

Am I expecting more from dask-jobqueue than I should? Or, is this a bug in my implementation or in dask.distributed of dask-jobqueue?

Thanks,
Bill

Activity

  1. guillaumeeb commented on Aug 11, 2018

    @guillaumeeb
    Member

    Thanks for this really interesting test! I haven't encounter this yet, as I am currently only using dask for interactive analysis, and usually computations I launch have enough workers to end in a few minutes maximum.

    However, I believe that, at least with adaptive cluster, for long running processes, workers should be restarted when allocation time expires. I will certainly need this in the near future. Currently, this is clearly not the case for non adaptive cluster. I cannot see anything in the code that would restart workers when a job ends. For adaptive, I don't know enough dask distributed code base yet, but the answer is probably there. Hopefully @mrocklin can answer this more easily.

    I will try to reproduce your use case in my system newt week.

    In any case, if this is not a bug of adaptive or our use of it, I think we should propose a solution here for having workers automatically restarted. Any advice @jhamman @mrocklin @lesteve ?

  2. mrocklin commented on Aug 12, 2018

    @mrocklin
    Member

    Am I expecting more from dask-jobqueue than I should?

    What you're describing seems like it's in scope for dask-jobqueue, but it's not currently implemented. This could be resolved by recording a set desired number of workers and re-scaling whenever a worker goes away, which could probably be handled by the remove_worker method of the JobQueuePlugin(SchedulerPlugin) class.

  3. guillaumeeb commented on Aug 13, 2018

    @guillaumeeb
    Member

    but it's not currently implemented

    So I take it adaptive clusters in distributed doesn't handle this either? Shouldn't it?

    which could probably be handled by the remove_worker method of the JobQueuePlugin(SchedulerPlugin)

    I had that in mind too, I'd be happy to work on it.

  4. mrocklin commented on Aug 13, 2018

    @mrocklin
    Member
  5. mrocklin commented on Aug 13, 2018

    @mrocklin
    Member
  6. guillaumeeb commented on Aug 13, 2018

    @guillaumeeb
    Member

    So i've tried that with and without adaptive. As expected, without adaptive, once the worker is killed, nothing happens anymore.

    With adaptive scaling, in my setup, a worker is restarted every time the previous one dies. Cool, that's what I want.

    However, I'm still running into a difficult issue. Here is the code I use for some background:

    cluster.adapt(minimum=1, maximum=1)
    client = Client(cluster)
    import time
    def my_slow_task(i):
        time.sleep(10)
        return i**2
    results = client.gather(client.map(my_slow_task, range(10)))

    The problem is, the worker is keeping all results into its memory for sending them all at once. But it gets killed half way every time. So we end up after several tries with the following exception:

    ---------------------------------------------------------------------------
    KilledWorker                              Traceback (most recent call last)
    <ipython-input-6-69e1e4e9d452> in <module>()
          1 futures = client.map(my_slow_task, range(10))
    ----> 2 results = client.gather(futures)
          3 results
    
    /work/ADM/hpc/eynardbg/Outils/miniconda3/envs/dask_dev/lib/python3.5/site-packages/distributed/client.py in gather(self, futures, errors, maxsize, direct, asynchronous)
       1560             return self.sync(self._gather, futures, errors=errors,
       1561                              direct=direct, local_worker=local_worker,
    -> 1562                              asynchronous=asynchronous)
       1563 
       1564     @gen.coroutine
    
    /work/ADM/hpc/eynardbg/Outils/miniconda3/envs/dask_dev/lib/python3.5/site-packages/distributed/client.py in sync(self, func, *args, **kwargs)
        650             return future
        651         else:
    --> 652             return sync(self.loop, func, *args, **kwargs)
        653 
        654     def __repr__(self):
    
    /work/ADM/hpc/eynardbg/Outils/miniconda3/envs/dask_dev/lib/python3.5/site-packages/distributed/utils.py in sync(loop, func, *args, **kwargs)
        273             e.wait(10)
        274     if error[0]:
    --> 275         six.reraise(*error[0])
        276     else:
        277         return result[0]
    
    /work/ADM/hpc/eynardbg/Outils/miniconda3/envs/dask_dev/lib/python3.5/site-packages/six.py in reraise(tp, value, tb)
        691             if value.__traceback__ is not tb:
        692                 raise value.with_traceback(tb)
    --> 693             raise value
        694         finally:
        695             value = None
    
    /work/ADM/hpc/eynardbg/Outils/miniconda3/envs/dask_dev/lib/python3.5/site-packages/distributed/utils.py in f()
        258             yield gen.moment
        259             thread_state.asynchronous = True
    --> 260             result[0] = yield make_coro()
        261         except Exception as exc:
        262             error[0] = sys.exc_info()
    
    /work/ADM/hpc/eynardbg/Outils/miniconda3/envs/dask_dev/lib/python3.5/site-packages/tornado/gen.py in run(self)
       1131 
       1132                     try:
    -> 1133                         value = future.result()
       1134                     except Exception:
       1135                         self.had_exception = True
    
    /work/ADM/hpc/eynardbg/Outils/miniconda3/envs/dask_dev/lib/python3.5/asyncio/futures.py in result(self)
        292             self._tb_logger = None
        293         if self._exception is not None:
    --> 294             raise self._exception
        295         return self._result
        296 
    
    /work/ADM/hpc/eynardbg/Outils/miniconda3/envs/dask_dev/lib/python3.5/site-packages/tornado/gen.py in run(self)
       1139                     if exc_info is not None:
       1140                         try:
    -> 1141                             yielded = self.gen.throw(*exc_info)
       1142                         finally:
       1143                             # Break up a reference to itself
    
    /work/ADM/hpc/eynardbg/Outils/miniconda3/envs/dask_dev/lib/python3.5/site-packages/distributed/client.py in _gather(self, futures, errors, direct, local_worker)
       1437                             six.reraise(type(exception),
       1438                                         exception,
    -> 1439                                         traceback)
       1440                     if errors == 'skip':
       1441                         bad_keys.add(key)
    
    /work/ADM/hpc/eynardbg/Outils/miniconda3/envs/dask_dev/lib/python3.5/site-packages/six.py in reraise(tp, value, tb)
        691             if value.__traceback__ is not tb:
        692                 raise value.with_traceback(tb)
    --> 693             raise value
        694         finally:
        695             value = None
    
    KilledWorker: ('my_slow_task-f7d3b870b0218db300f66ed70fe3fba2', 'tcp://10.135.36.29:44953')
  7. mrocklin commented on Aug 13, 2018

    @mrocklin
    Member
  8. josephhardinee commented on Aug 13, 2018

    @josephhardinee
    Contributor

    Out of curiosity, how does that work? I assume when a new worker needs to be started, a new jobscript has to be submitted. I assume that would need to be handled by jobqueue and not distributed?

  9. guillaumeeb commented on Aug 13, 2018

    @guillaumeeb
    Member

    I don't exactly know how adaptive cluster is implemented in distributed, but the idea is that something is watching for dask cluster load, and calling scale method accordingly, for example if there are a lot more pending tasks than available workers.

    Considering the issue here:

    • adaptive is already doing the first identified need: insuring there is always a minimum number of workers alive. Is it still worth implementing that as a dask-jonqueue default?
    • Second thing is that users should not submit graphs that cannot finish within the job allocated time and the requested number of workers. Submitting several graphs should be fine though (so doing batches if needed). Is this correct? Should we add this in the docs somehow?
  10. mrocklin commented on Aug 13, 2018

    @mrocklin
    Member

    FWIW the adaptive implementation is only 300 lines of code. It might be a good evening read if anyone is interested:

    https://github.com/dask/distributed/blob/master/distributed/deploy/adaptive.py

    adaptive is already doing the first identified need: insuring there is always a minimum number of workers alive. Is it still worth implementing that as a dask-jonqueue default?

    I don't know. @jhamman might have thoughts. Alternatively maybe there is some way to change Adaptive to maintain a set target rather than move that target around.

    Second thing is that users should not submit graphs that cannot finish within the job allocated time and the requested number of workers. Submitting several graphs should be fine though (so doing batches if needed). Is this correct? Should we add this in the docs somehow?

    It should be possible to run a single large graph with an evolving herd of workers, even if the workers don't live very long.

  11. jhamman commented on Aug 13, 2018

    @jhamman
    Member

    Alternatively maybe there is some way to change Adaptive to maintain a set target rather than move that target around.

    I think this is necessary to do this correctly. Ideally we could have a Cluster.target_workers property. This property would be updated by both Cluster.scale() and Adaptive. My recent attempts to improve the adaptive scaling in jobqueue in #97 have highlighted the need for this.

    Another thing that would be worth discussing is the ability for Adaptive to query the Cluster for pending workers. This obviously comes up in jobqueue when there are jobs in a queue but I image this will also be useful to other dask deploy managers (dask-kubernetes, etc.).

  12. wgustafson commented on Aug 13, 2018

    @wgustafson
    ContributorAuthor

    Sounds like you have a pretty good idea of my workflow scenario and some initial ideas on what might be needed to enable it to work predictably. Thanks for looking into this.

    From @guillaumeeb it looks like there might be something going on with NERSC's edison computer compared to his cluster since I was not seeing any restarts, whereas he was getting restarts but with data passing issues. If you would like me to run any tests on edison, let me know.

  13. guillaumeeb commented on Aug 13, 2018

    @guillaumeeb
    Member

    @wgustafson, it could still be useful if you could give us some simplified version of the code your trying to run, just to be sure.

    For information, I've performed my tests with a dask-jobqueue installed from one of the latest commit in master branch, were you using this to, or did you just pip (or conda) installed the latest released package?

    @jhamman just to be sure, appart from fixing some edge case issues detected with #97, you believe it will be a good idea to have automatic restart of finished jobs by default?

    It should be possible to run a single large graph with an evolving herd of workers, even if the workers don't live very long.

    @mrocklin from my recent experiment here, I cannot see how it could be possible for now. Are in memory data backed up or transmitted in some way between workers? The simple workflow of submitting a group of independent tasks seems to show that you need to have at least workers that last enough time to process nb_tasks / nb_worker tasks. But I did not try with several workers, so this is just a guess.

  14. jhamman commented on Aug 13, 2018

    @jhamman
    Member

    @jhamman just to be sure, appart from fixing some edge case issues detected with #97, you believe it will be a good idea to have automatic restart of finished jobs by default?

    I was thinking this would only work when using Adaptive. I think a non-adaptive job that dies due to a wall-clock expiration should stay dead.

  15. guillaumeeb commented on Aug 14, 2018

    @guillaumeeb
    Member

    Yep, I agree with you @jhamman, no reason to implement a more complex default behavior when most of the time this is not needed (and probably not what we want), and also when there is already a complex mechanism that answers the need.

    So this works right now with Adaptive, and you've also opened #112 to fix the edge cases.

    Another thing that would be worth discussing is the ability for Adaptive to query the Cluster for pending workers.

    I let you open another issue for that part, and if you can provide some advantages it would have.

    Now @wgustafson, lets try to solve your adaptive problem, and also to see if your workflow is compatible with dying and restarting workers.

  16. 62 remaining items

  17. eXpensia commented on Aug 29, 2019

    @eXpensia

    Thanks for the answers, i'll check the extra parameters.

  18. jni commented on Oct 14, 2019

    @jni

    @lesteve I'm finally ready to work on this. =) My main issue is that I don't understand how to test everything locally. Does dask-jobqueue provide a way to create a "dummy" cluster/scheduler for testing purposes? ie I'd like to test submitting jobs on my machine without having to depend on my institutional SLURM cluster. Any pointers here would be highly appreciated!

  19. lesteve commented on Oct 14, 2019

    @lesteve
    Member

    Great to hear that!

    I think an excellent first step would be to have a minimal example to reproduce the original problem on a real cluster. This can be done independently of testing things locally.

    About the dask-jobqueue testing infrastructure, we do have a docker-compose setup for some schedulers (SGE, PBS, SLURM) that you can run locally (and that is used for CI).

    There is a bit of doc about that in https://jobqueue.dask.org/en/latest/develop.html#test-with-job-scheduler.

    #324 might have some additional useful info as well.

    PR to improve the doc about how to test locally and/or how to make it more prominent are more than welcome!

  20. jni commented on Oct 14, 2019

    @jni

    This should be sufficient for a reproducible example. I'm making it take 30min but it should be straightforward to reduce that... I just don't have a good sense of the overhead of launching a worker so I was reluctant to reduce it further. To reduce it:

    • reduce the total duration (in cluster.adapt)
    • reduce the walltime to half of that duration
    • reduce the range call in filenames = [] to 4 * 60 * target duration (in mins)

    Everything else should be the same.

    import time
    import numpy as np
    from dask_jobqueue import SLURMCluster as Cluster
    from dask import delayed
    from dask.distributed import Client, as_completed
    
    # config in $HOME/.config/dask/jobqueue.yaml
    cluster = Cluster(walltime='00:15:00', cores=1, memory='4gb', job_cpu=1,
                      job_mem='4gb')
    cluster.adapt(minimum=0, maximum=4, target_duration='30min')
    client = Client(cluster)
    
    # each job takes 1s, and we have 4 cpus * 30 min * 60s/min = 7200 cpu.s
    filenames = [f'img{num}.jpg' for num in range(7200)]
    
    def features(num_fn):
        num, image_fn = num_fn
        time.sleep(1)  # takes about 1s to compute features on an image
        features = np.random.random(246)
        return num, features
    
    
    num_files = len(filenames)
    num_features = len(features(filenames[0])[1])
    
    X = np.zeros((num_files, num_features), dtype=np.float32)
    
    for future in as_completed(client.map(features, enumerate(filenames))):
        i, v = future.result()
        X[i, :] = v
    
    assert not np.any(np.sum(X, axis=1) == 0)  # make sure all rows were filled

    Here's my yaml config, though it probably doesn't need much of this:

    jobqueue:
      slurm:
        name: dask-worker
    
        # Dask worker options
        cores: 8                # Total number of cores per job
        memory: 36gb                # Total amount of memory per job
        processes: 1                # Number of Python processes per job
    
        #interface: null             # Network interface to use like eth0 or ib0
        death-timeout: 60           # Number of seconds to wait if a worker can not find a scheduler
        local-directory: $TMPDIR       # Location of fast local storage like /scratch or $TMPDIR
    
        # SLURM resource manager options
        #queue: null
        project: su62
        walltime: '01:00:00'
        #extra: []
        #env-extra: []
        job-cpu: 8
        job-mem: 36gb
        #job-extra: {}
        log-directory: /home/jnun0003/dask-logs

    To work around the issue with current dask-jobqueue, you do:

    work_queue = as_completed(client.map(features, enumerate(filenames)))
    for future in work_queue:
        try:
            i, v = future.result()
        except KilledWorker:
            client.retry([future])
            work_queue.add(future)
        else:
            X[i, :] = v

    in the for-loop.

    To fix the issue with the latest dask-distributed, when a dask-worker job gets submitted to the cluster, we should add --lifetime=<value> where value is the walltime of the cluster worker, minus some small margin, e.g. 1min. This will make the dask scheduler not treat the death of that worker as suspicious. I think .adapt will take care of launching a new worker. It's unclear to me whether --lifetime-stagger is something we should worry about at this point.

    Please let me know if the script above is sufficient to reproduce the issue for you!

  21. lesteve commented on Oct 15, 2019

    @lesteve
    Member

    Great thanks a lot for your input!

    This is the snippet I am trying to run on my cluster SGE. I just launched it will tell you whether this reproduces or not.

    There were are a few fixes I had to do (lines are indicated by # FIX in the snippet below):

    • for the latest version of distributed (30minutes rather than 30min, list(enumerate) rather than enumerate otherwise "TypeError: Dask no longer supports mapping over Iterators or Queues.Consider using a normal for loop and Client.submit")
    • one minor fix in your logic
    import time
    import numpy as np
    from dask_jobqueue import SGECluster as Cluster
    from dask import delayed
    from dask.distributed import Client, as_completed
    
    # config in $HOME/.config/dask/jobqueue.yaml
    cluster = Cluster(walltime='00:15:00', cores=1, memory='4gb',
        queue='all.q',
        resource_spec='h_vmem=10G,mem_req=4G') #, job_cpu=1, job_mem='4gb')
    
    cluster.adapt(minimum_jobs=0, maximum_jobs=4, target_duration='30minutes') # FIX
    client = Client(cluster)
    
    
    # each job takes 1s, and we have 4 cpus * 30 min * 60s/min = 7200 cpu.s
    filenames = [f'img{num}.jpg' for num in range(7200)]
    
    def features(num_fn):
        num, image_fn = num_fn
        time.sleep(1)  # takes about 1s to compute features on an image
        features = np.random.random(246)
        return num, features
    
    
    num_files = len(filenames)
    num_features = len(features((0, filenames[0]))[1]) # FIX
    
    X = np.zeros((num_files, num_features), dtype=np.float32)
    
    for future in as_completed(client.map(features, list(enumerate(filenames)))): # FIX
        i, v = future.result()
        X[i, :] = v
    
    assert not np.any(np.sum(X, axis=1) == 0)  # make sure all rows were filled

    Error:

    ---------------------------------------------------------------------------
    KilledWorker                              Traceback (most recent call last)
    ~/work/test-dask-jobqueue.py in <module>
         30 
         31 for future in as_completed(client.map(features, list(enumerate(filenames)))):
    ---> 32     i, v = future.result()
         33     X[i, :] = v
         34 
    
    ~/miniconda3/envs/dask/lib/python3.7/site-packages/distributed/client.py in result(self, timeout)
        219         if self.status == "error":
        220             typ, exc, tb = result
    --> 221             raise exc.with_traceback(tb)
        222         elif self.status == "cancelled":
        223             raise result
    
    KilledWorker: ('features-9926151cd21fae08dd7f1e8344cadf85', <Worker 'tcp://10.141.0.18:35898', memory: 0, processing: 3617>)
    
  22. lesteve commented on Oct 16, 2019

    @lesteve
    Member

    I can reproduce the problem indeed, which is a great start. I edited my earlier message with the error.

  23. added
    documentation
    enhancement
    on Feb 21, 2020
  24. added this to the 0.9 milestone on Feb 21, 2020
  25. guillaumeeb commented on May 10, 2020

    @guillaumeeb
    Member

    Thanks to @willsALMANJ issue a few days ago, I tried the --lifetime option and I confirm that it works perfectly with the latest Dask, Distributed and Jobqueue versions.

    The initial script I used (just reduced time):

    import time
    import numpy as np
    from dask_jobqueue import PBSCluster as Cluster
    from dask import delayed
    from dask.distributed import Client, as_completed
    
    # config in $HOME/.config/dask/jobqueue.yaml
    cluster = Cluster(walltime='00:01:00', cores=1, memory='4gb')
    cluster.adapt(minimum=0, maximum=4) # FIX
    
    client = Client(cluster)
    
    # each job takes 1s, and we have 4 cpus * 1 min * 60s/min = 240 cpu.s, let's ask for a little more tasks.
    filenames = [f'img{num}.jpg' for num in range(480)]
    
    def features(num_fn):
        num, image_fn = num_fn
        time.sleep(1)  # takes about 1s to compute features on an image
        features = np.random.random(246)
        return num, features
    
    num_files = len(filenames)
    num_features = len(features((0, filenames[0]))[1]) # FIX
    
    X = np.zeros((num_files, num_features), dtype=np.float32)
    
    for future in as_completed(client.map(features, list(enumerate(filenames)))): # FIX
        i, v = future.result()
        X[i, :] = v

    It fails with a KilleWorkerException when the first 4 workers are killed due to walltime.

    Just modify the cluster initialization:

    cluster = Cluster(walltime='00:01:00', cores=1, memory='4gb', extra=["--lifetime", "50s"])

    And it works! I think it solves the problem here.

    It's unclear to me whether --lifetime-stagger is something we should worry about at this point

    I think this would be valuable when scaling up with 100s of workers, at that point you don't want them all to stop at the same time.

    I'll try to produce some documentation to explain all that and close this issue. The outline should look something like:

    How to handle Job Queueing system walltime killing workers

    Reaching walltime can be troublesome

    • when you don't have a lot of room on you HPC platform and have only a few workers at a time: these workers will be killed (and other started) before you workload ends.
    • when you really don't know how long your workload will take: all your workers could be killed before reaching the end. In this case, you want to use adaptive clusters.

    If you don't set the proper parameters, you'll run into KilleWorker exceptions in thos two cases.
    Use --lifetime worker option. This will enables infinite workloads using adaptive.

    Use --lifetime-stagger when dealing with many workers.

    Examples

    cluster = Cluster(walltime='01:00:00', cores=4, memory='16gb', extra=["--lifetime", "55m", "--lifetime-stagger", "4m"])
    cluster.adapt(minimum=0, maximum=200)
    
    ...
  26. MatthewLennie commented on Aug 25, 2020

    @MatthewLennie

    @guillaumeeb Is this still current? It seems like there is an additional flag in the Worker CLI to trigger life time restarts --lifetime-restart. Even with the additional flag this doesn't seem to work for me.

  27. guillaumeeb commented on Aug 25, 2020

    @guillaumeeb
    Member

    Is this still current?

    I just tested with dask and distributed 2.22.0 and jobqueue 0.7.1, and it works.

    It seems like there is an additional flag in the Worker CLI to trigger life time restarts --lifetime-restart. Even with the additional flag this doesn't seem to work for me

    You don't want to use this flag in this case, or your jobs will never terminate normally, they will be killed by the job scheduler due to walltime. What you want is your jobs ending before the walltime limit, so only --lifetime.

    Did you tested this with the code above, or your own code?

  28. riedel commented on Oct 11, 2020

    @riedel
    Member

    What is the correct way to evict a job from the schedulers point of view? Is SIGTERM enough for a worker to correctly terminate and transfer its memory, after dask/distributed#2844 gets merged?

    Does gracefull shutdown mean, that memory gets moved?

    I agree that workers ideally terminate one after another, there should be a way to spin up replacements well in time or choose staggered walltimes, since my problem was that all workers had approximately the same wall time and there would have been no way to gracefully handle the situation. What is the current policy here and what would be a sensible policy? It does not make sense to transfer memory and tasks to the worker that dies next I guess. What would be the idea how to handle it?

    It seems to me that adapt could have the tendency to kill the youngest jobs first, since they do not carry too much data. Will specifying lifetime take care of this? Or is this implicitely handled by adapt, because an empty new worker is spun up, that is an ideal target?

  29. guillaumeeb commented on Jan 23, 2021

    @guillaumeeb
    Member

    @riedel sorry for the delay...

    Just submitted a merge request to clarify things here and close this issue.

    What is the correct way to evict a job from the schedulers point of view?

    From Dask-jobqueue perspective, just use --lifetime option as explained above. This will trigger a gracefull shutdown.

    What is the current policy here and what would be a sensible policy?

    Use --lifetime-stagger option.

    It does not make sense to transfer memory and tasks to the worker that dies next I guess. What would be the idea how to handle it?

    Hmm, I guess there is no correct answer to this right now. The solution here probably won't work well on worker with a heavy memory load.

    Will specifying lifetime take care of this?

    I don't think that. The first started worker will be killed first (with some uncertainties due to --lifetime-stagger). But here we've got no choice, this is a job queueing system walltime problem, these workers would be killed anyway.

    Or is this implicitely handled by adapt, because an empty new worker is spun up, that is an ideal target?

    Not handled by adapt, but I guess the Scheduler has some logics on reafecting tasks and memory, and it will probably aim the youngest and free workers for this.

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

    bugdocumentationenhancementhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions