Delay pollers when under heavy load#1497
Merged
ssalinas merged 10 commits intocache_pending_pathfrom Apr 19, 2017
Merged
Conversation
wsorenson
reviewed
Apr 10, 2017
| private final int delayCleanupWhenAboveTasks; | ||
| private final long delayCleanupForMs; | ||
|
|
||
| private AtomicLong nextRunAfter = new AtomicLong(0); |
wsorenson
reviewed
Apr 10, 2017
| private SingularityAbort abort; | ||
| private SingularityMesosSchedulerDelegator mesosScheduler; | ||
|
|
||
| private AtomicLong nextRunAfter = new AtomicLong(0); |
Contributor
Author
|
Sry for unused vars and such, hadn't finished this one yet. I'll clean it up in the morning |
Contributor
Author
|
Changed the strategy on this one. Singularity will now keep track of the average status update delta over the last 30s (avg delta is exposed in the state as well). If the delta is over a configured amount (default of 30s), the major scheduler-lock-consuming pollers will all short circuit and offer processing will immediately decline all offers until the delta is back under the configured value. The delta is updated on a 5 second interval by a separate poller. |
Contributor
Author
|
merging this into the other leader cache PR |
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.
Still working out if this is the right strategy. This would allow each poller to determine if it was previously under a heavier than normal load, and then delay it's next run such that other items contending for the scheduler lock (e.g. status updates) have time to get in. Implemented just cleanup poller to start, based on number of cleanup tasks
/cc @wsorenson