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

Remove unused codepath from HighThroughputExecutor scale_in #3115

Merged
merged 2 commits into from
Mar 1, 2024

Conversation

benclifford
Copy link
Collaborator

The codepath would be used when scale_in is called with:

force=False
max_idletime=None

and would pick blocks from the list of blocks which are currently idle.

This PR removes that unused codepath, merging the choice of forced/non-forced scale-in and idle time specification into a single parameter that indicates "do not scale in blocks that have not been idle this long".

The two remaining cases from force=True/False, max_idletime=None/number are:

  • max_idletime=None, previously: force=True, max_idletime=None

This means that the requested number of blocks should be scaled in, even if the blocks are not idle. The use case for this path is "parsl is shutting down, so we need to tidy up everything. If there are tasks still running, we don't care because terminating in-progress tasks is part of parsl shutdown."

  • max_idletime=some time, previousy: force=False, max_idletime=some time

This means that the scaling code has decided to apply downwards pressure on the number of blocks: there are more blocks than needed. However, this pressure should not disrupt already running tasks, and it is less urgent to cancel blocks, because the same call will happen every 5 seconds to keep applying that pressure.

Changed Behaviour

This is removing an unused code path, so should not change any user-visible behaviour.

Type of change

  • Code maintenance/cleanup

The codepath would be used when scale_in is called with:

  force=False
  max_idletime=None

and would pick blocks from the list of blocks which are currently idle.

This PR removes that unused codepath, merging the choice of
forced/non-forced scale-in and idle time specification into a single
parameter that indicates "do not scale in blocks that have not been
idle this long".

The two remaining cases from force=True/False, max_idletime=None/number
are:


* max_idletime=None, previously: force=True, max_idletime=None

This means that the requested number of blocks should be scaled in, even
if the blocks are not idle. The use case for this path is "parsl is shutting
down, so we need to tidy up everything. If there are tasks still running, we
don't care because terminating in-progress tasks is part of parsl shutdown."

* max_idletime=some time, previousy: force=False, max_idletime=some time

This means that the scaling code has decided to apply downwards pressure on
the number of blocks: there are more blocks than needed. However, this
pressure should not disrupt already running tasks, and it is less urgent to
cancel blocks, because the same call will happen every 5 seconds to keep
applying that pressure.
@benclifford
Copy link
Collaborator Author

This PR failed (on Python 3.11) in a scaling test that, although its scaling related, seems unrelated to this PR, but it is a test introduced in master very recently - #3097 one commit ago - so there is some possibility that this new test is now uncovering some breakage as it is supposed to, just non-deterministically. I'll make a note in PR #3097 about the details

@benclifford benclifford merged commit 39ecb9c into master Mar 1, 2024
6 checks passed
@benclifford benclifford deleted the benc-ghent-tidy-scalein-force branch March 1, 2024 16:55
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.

2 participants