Skip to content

Delay pollers when under heavy load#1497

Merged
ssalinas merged 10 commits intocache_pending_pathfrom
poller_delay
Apr 19, 2017
Merged

Delay pollers when under heavy load#1497
ssalinas merged 10 commits intocache_pending_pathfrom
poller_delay

Conversation

@ssalinas
Copy link
Copy Markdown
Contributor

@ssalinas ssalinas commented Apr 10, 2017

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

private final int delayCleanupWhenAboveTasks;
private final long delayCleanupForMs;

private AtomicLong nextRunAfter = new AtomicLong(0);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this should be final

private SingularityAbort abort;
private SingularityMesosSchedulerDelegator mesosScheduler;

private AtomicLong nextRunAfter = new AtomicLong(0);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this isn't used

@ssalinas
Copy link
Copy Markdown
Contributor Author

Sry for unused vars and such, hadn't finished this one yet. I'll clean it up in the morning

@ssalinas ssalinas changed the title WIP - Delay pollers when under heavy load Delay pollers when under heavy load Apr 11, 2017
@ssalinas
Copy link
Copy Markdown
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.

@ssalinas ssalinas added the hs_qa label Apr 11, 2017
@ssalinas
Copy link
Copy Markdown
Contributor Author

merging this into the other leader cache PR

@ssalinas ssalinas merged commit a98118a into cache_pending_path Apr 19, 2017
@ssalinas ssalinas deleted the poller_delay branch April 19, 2017 12:45
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