Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@epwalsh
Copy link
Member

@epwalsh epwalsh commented Nov 7, 2022

No description provided.

@epwalsh epwalsh requested review from codeviking and dirkgr November 7, 2022 19:14
@codeviking codeviking requested review from mewil and removed request for codeviking November 7, 2022 19:16
@codeviking
Copy link

I added @mewil, as he knows the constraint stuff better than I!

env_vars=self.env_vars,
priority=priority,
)
.with_constraint("cluster", [clusters] if isinstance(clusters, str) else clusters)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

Comment on lines 706 to 712
experiment,
strict=True,
quiet=True,
timeout=6.0,
poll_interval=5.0,
)
time.sleep(2.0)
time.sleep(5.0)
Copy link
Member Author

Choose a reason for hiding this comment

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

Eases back the volume of requests FYI @codeviking

Copy link

@codeviking codeviking Nov 7, 2022

Choose a reason for hiding this comment

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

So this will make a request every 5 seconds, instead of every 2, per job -- is that right?

This still feels like a lot. Most of our jobs are quite long. Plus, it often takes at least a minute or two for Beaker to start the job by shoveling around datasets, containers and the like.

So I'd propose ratcheting this way back. What if we only asked for a job's status twice per minute?

Copy link

Choose a reason for hiding this comment

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

+1 to doing fewer requests for long-running jobs. Here's a potentially simple heuristic:

If time observing < 5 minutes: poll every 5 seconds
If time observing >= 5 minutes: poll ever 1 minute
If time observing >= 30 minutes: poll every 5 minutes

What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we can just keep it simple and always poll twice per minute

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

@dirkgr dirkgr left a comment

Choose a reason for hiding this comment

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

Haven't run it yet, but code looks good.

@epwalsh epwalsh merged commit 570d24e into main Nov 8, 2022
@epwalsh epwalsh deleted the beaker-scheduler branch November 8, 2022 21:49
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.

5 participants