match wait time between SIGTERM to 1/2 a batch. - #1552
Open
petersilva wants to merge 1 commit into
Open
Conversation
The other half of #1531 is that we consult the metrics available for all the flows being stopped. We add a meanBatch metric, to the msgRate metrics to understand how long it should take for given flow to finish stopping. So it doesn't SIGKILL until a time that is >2.5 times the average time to process an entire batch has gone by.
Test Results245 tests 243 ✅ 1m 34s ⏱️ For more details on these failures, see this check. Results for commit 753ee43. ♻️ This comment has been updated with latest results. |
Contributor
Author
|
hey guys? This is still here. Nothing wrong with it, afaik. It just changes the delay between SIGTERMs and SIGKILLS. It should help a lot in the case of big batches, because it should wait about 2.5 batches between sending signals and thus be far more likely to terminate cleanly. |
Member
|
This sounds promising but we haven't had a chance to test it yet. We'll test on ddsr-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The other half of #1531 is that we consult the metrics available for all the flows being stopped. We add a meanBatch metric, to the msgRate metrics to understand how long it should take for given flow to finish stopping. So it doesn't SIGKILL until a time that is >2.5 times the average time to process an entire batch has gone by.
It turned out much easier than the method described in the issue discussion. Instead of having to use new statefiles, I was able to use existing metrics files. Using the batch setting turned out to be bad, because often flow have very small batches, so the maximum given by the setting is far too long. Added a meanBatch to the flow metrics to understand how big the average batch is. Use that new metric with the existing msgRate to say that:
Often this is a very short period of time, and it will result in stop running faster.
When dealing with very large file transfers, or large batches of files being transferred, this change will make it wait a more appropriate amount of time.