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

add vine_hungry wrapper #3997

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

btovar
Copy link
Member

@btovar btovar commented Dec 2, 2024

vine_hungry is a potentially expensive operation if there are many workers connected or many waiting tasks. However, the hunger value only changes significantly when the number of connected workers changes, and this does not happen very often. This pr makes it so that we only call the hungry computation every 5s (by default), and in between these calls we simply keep track how many tasks have been added/removed to the ready queue since last time.

This should make it safer to call vine_hungry inside a loop, like in #3991.

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.
  • Manual Update: Update the manual to reflect user-visible changes.
  • Type Labels: Select a github label for the type: bugfix, enhancement, etc.
  • Product Labels: Select a github label for the product: TaskVine, Makeflow, etc.
  • PR RTM: Mark your PR as ready to merge.

@dthain
Copy link
Member

dthain commented Dec 2, 2024

Add a big fat comment!

@btovar btovar merged commit ca1b4d1 into cooperative-computing-lab:master Dec 2, 2024
10 checks passed
@btovar btovar deleted the hungry_intervals branch December 2, 2024 20:57
btovar added a commit that referenced this pull request Dec 14, 2024
* add vine_hungry wrapper

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

Successfully merging this pull request may close these issues.

3 participants