-
Notifications
You must be signed in to change notification settings - Fork 123
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
vine: count the available resources for a task on a worker #4037
vine: count the available resources for a task on a worker #4037
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is fragile to memory leaks. There are some returns that do not free the struct rmsummary created. Unless there is a strong reason, I'd advise against it.
The reason I do this is that even though most allocations work fine in #4035 and tasks run pretty densely, the manager still wastes a lot of time checking tasks when there aren’t any usable cores. The most common issue in Task scheduling seems to be an expensive part of the main loop, we could save a lot of time by making this more efficient, and then the manager has more time to do other stuff like output retrieving and temp file replication. |
But this change is not reducing the number of computations? It is just moving code around and creates mem leaks? What about adding a flag to the worker like |
This is a smart way! |
An alternative in #4039 |
Proposed Changes
Calculate the usable resources for a task on a worker and check it earlier. The avoids resource allocations if the worker doesn't have usable resources for a task at all.
This speeds up my workflows slightly, for about 1.5%
Merge Checklist
The following items must be completed before PRs can be merged.
Check these off to verify you have completed all steps.
make test
Run local tests prior to pushing.make format
Format source code to comply with lint policies. Note that some lint errors can only be resolved manually (e.g., Python)make lint
Run lint on source code prior to pushing.