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
With restart_workers=True, QUEENS restarts a worker after each of its jobs finishes. But the worker does not wait for that restart: it immediately starts its next job. So the restart always hits a job that is already running.
To soften this, every job first sleeps 5 s before doing real work (_dask.py, lines 101–106). The idea: the restart arrives within those 5 s and only kills a sleeping job, which is cheap to redo elsewhere.
With many short jobs, the restart often arrives too late. The restart signal is late because QUEENS sends the restarts one after another, and with many short jobs, many finish at the same time.
Consequences
Killed jobs redo their work from scratch. Each kill counts as a failure; enough of them abort the whole run (KilledWorker), although no job actually failed. The 5s sleep alone costs a lot of core-hours potentially (when there are a lof of short running jobs).
Long jobs hide the problem: restarts arrive fast enough, and 5 s do not matter. #57 is similar.
Possible fixes, from small to large
Document it: keep False for short jobs; True costs 5 s per job and kills the next job.
Make the 5 s delay configurable.
Let workers restart on their own between jobs (e.g., Dask's lifetime option) instead of being restarted from outside. This would remove both the sleep and the kills, and probably fix Not all workers are restarted on cluster #57 too.
What?
With
restart_workers=True, QUEENS restarts a worker after each of its jobs finishes. But the worker does not wait for that restart: it immediately starts its next job. So the restart always hits a job that is already running.To soften this, every job first sleeps 5 s before doing real work (
_dask.py, lines 101–106). The idea: the restart arrives within those 5 s and only kills a sleeping job, which is cheap to redo elsewhere.With many short jobs, the restart often arrives too late. The restart signal is late because QUEENS sends the restarts one after another, and with many short jobs, many finish at the same time.
Consequences
Killed jobs redo their work from scratch. Each kill counts as a failure; enough of them abort the whole run (
KilledWorker), although no job actually failed. The 5s sleep alone costs a lot of core-hours potentially (when there are a lof of short running jobs).Long jobs hide the problem: restarts arrive fast enough, and 5 s do not matter. #57 is similar.
Possible fixes, from small to large
Falsefor short jobs;Truecosts 5 s per job and kills the next job.lifetimeoption) instead of being restarted from outside. This would remove both the sleep and the kills, and probably fix Not all workers are restarted on cluster #57 too.