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

Performance: Do not schedule smartstate dispatch unless it is needed #15067

Merged

Conversation

isimluk
Copy link
Member

@isimluk isimluk commented May 11, 2017

The smart-state job dispatch is not something that is needed every other moment. It is usually initiated manually or scheduled by some policy. Most of the time (for most appliances) JobProxyDispatcher#dispatch will result in no-op. We can tell (whether it is needed) by a single query that's really quick. The query uses index on jobs table and checks just existence (ends quickly on success).

Note that touching queue is expensive (observation of heavily loaded deployments) compared to touching jobs table.

Real time Savings depend on server load and number of zones.

People who enable smart-state, but use it only rarely will benefit greatly. The users who use smart-state heavily wouldn't be burdened that much as the smart-state itself consumes heck a lot of resources.

People who enable smart-state, but use it only rarely will benefit
greatly. The users who use smart-state heavily wouldn't be burdened that
much as the smart-state itself consumes heck a lot of resources.

The smart-state job dispatch is not something that is run every freaking
moment. It is usually run manually or schedule by some policy. My
assumption is that most of the time JobProxyDispatcher#dispatch will
result in no-op. We can tell by single query that's really quick. The
query uses index on jobs table and checks just existence (ends quickly
on success).

Note that touching queue is expensive (observation of heavily loaded
deployments) compared to touching jobs table.

Real time Savings depend on server load and number of zones.
@miq-bot
Copy link
Member

miq-bot commented May 11, 2017

Checked commit isimluk@1b10ea7 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks fine. 🏆

Copy link
Member

@gtanzillo gtanzillo left a comment

Choose a reason for hiding this comment

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

Wow, a nice simple change that will provide a lot of benefit! 👍

@gtanzillo gtanzillo added this to the Sprint 61 Ending May 22, 2017 milestone May 16, 2017
@gtanzillo gtanzillo merged commit fdbf5c1 into ManageIQ:master May 16, 2017
@isimluk isimluk deleted the schedule-ssa-job-dispatch-on-demand branch May 16, 2017 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants