Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce config for default task duration #3642

Merged
merged 3 commits into from
Mar 27, 2020

Conversation

gsailer
Copy link
Contributor

@gsailer gsailer commented Mar 26, 2020

This introduces the key distributed.scheduler.task-duration in the Dask config to configure a default task duration for all tasks, when there is no otherwise configured value available.

That is useful in cases of very long-running tasks to tune the occupancy of the cluster (see #3516 and #3627 )

@quasiben
Copy link
Member

Thanks @sublinus . Looks reasonable to me and definitely appreciate the test! I am going to wait until the end of the day to merge should other maintainers want to comment

Copy link
Member

@TomAugspurger TomAugspurger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice. My only question would be on the name. Do we like task-duration or should we call out unknown-task-duration?

@@ -24,6 +24,9 @@ distributed:
pickle: True # Is the scheduler allowed to deserialize arbitrary bytestrings
preload: []
preload-argv: []
# Assume this duration ("15m", "2h") for all tasks with unknown durations
# This can be useful to change occupancy estimations in Adaptive scenarios
task-duration: null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this have a non-null value? What do we do currently?

So far we've been limiting comments for configuration values to be a bit shorter and be on the same line. If we choose to change convention here and have much larger comments then we should probably do that across the file. For now I recommend that we try to make the comment more brief if we can.

@gsailer
Copy link
Contributor Author

gsailer commented Mar 26, 2020

Thanks for all your comments. The question regarding the non-null value just pointed me to scheduler.get_task_duration, which is where I think this unknown-task-duration should be used instead of in the TaskPrefix as an average.
Currently the default used for tasks with unknown task durations is 0.5s, which is now reflected in the config.
I totally see your point regarding the comment style.

@gsailer
Copy link
Contributor Author

gsailer commented Mar 27, 2020

The partial CI failure seems to be unrelated here.

@gsailer gsailer force-pushed the default-task-duration branch from 775fd8c to fd2f6d7 Compare March 27, 2020 10:51
@quasiben
Copy link
Member

@sublinus i think you are probably right but I restarted the tests job to be sure.

Copy link
Member

@mrocklin mrocklin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small comments. Otherwise this looks fine to me.

distributed/distributed.yaml Outdated Show resolved Hide resolved
distributed/tests/test_scheduler.py Show resolved Hide resolved
Gabriel Sailer and others added 2 commits March 27, 2020 17:02
Co-Authored-By: Matthew Rocklin <mrocklin@gmail.com>
@gsailer
Copy link
Contributor Author

gsailer commented Mar 27, 2020

The build shows as in progress even though GH Actions and Travis ran through fine. It looks like the notify about the successful build from Travis to Github failed.

@mrocklin mrocklin merged commit eda27be into dask:master Mar 27, 2020
@mrocklin
Copy link
Member

Thanks @sublinus ! This is in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants