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

Adding Different Queuing Strategies #4

Merged
merged 49 commits into from
Nov 11, 2013
Merged

Conversation

emsa23
Copy link
Contributor

@emsa23 emsa23 commented Oct 6, 2013

The changes moves to Priority Sorter to 2.0-SNAPSHOT

  • "Legacy" is still supported and the Plugin will in "Legacy" mode still behave like 1.x versions.
  • Converting to "Advanced" mode will preserve relative priorities.

In "Advanced" mode:

  • Configurable number of priorities
  • Configurable Default priority
  • Set priority on Jobs based on View and/or job-name filter (new Action/Page on main page)
    • For each view a list a strategies for settings priorities can be set
    • Priority can be set based on way the jobs is started
    • Priority can be set by using Job Parameter
  • Option to allow or prevent setting Priority directly on Jobs
  • Option to select priority-sorting algorithm between:
    • "Absolute" (what Priority Sorter does today)
    • "Fair Queuing" (equally distribute resources over a number of "buckets")
    • "Weighted Fair Queuing" (weighted distribution of resources over a number of "buckets")*

@buildhive
Copy link

Jenkins » priority-sorter-plugin #5 SUCCESS
This pull request looks good
(what's this?)

@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

});
return;
}
// If the queue is empty reset the internal priority counters
Copy link
Member

Choose a reason for hiding this comment

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

What about two other strategies?
Anyway, it would be better to have a class for each strategy, which stores sorting methods and configuration stuff. Then, it will be much easier to convert these classes to extensions at some point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The two strategies above this line doesn't use the counter but the two below do.

Yes it would be better and I do plan in the next dev phase treat strategies as Extensions but as of now I would like to keep this hard-coded and make sure that the overall concept and implementation is valid before going there.

@buildhive
Copy link

Jenkins » priority-sorter-plugin #6 SUCCESS
This pull request looks good
(what's this?)

@buildhive
Copy link

Jenkins » priority-sorter-plugin #7 SUCCESS
This pull request looks good
(what's this?)

@buildhive
Copy link

Jenkins » priority-sorter-plugin #8 SUCCESS
This pull request looks good
(what's this?)

@buildhive
Copy link

Jenkins » priority-sorter-plugin #9 SUCCESS
This pull request looks good
(what's this?)

@buildhive
Copy link

Jenkins » priority-sorter-plugin #10 SUCCESS
This pull request looks good
(what's this?)

@cloudbees-pull-request-builder

plugins » priority-sorter-plugin #1 SUCCESS
This pull request looks good

Caching actual/calculated priority value on the Job
to avoid recalculation when rendering the priority column.
@cloudbees-pull-request-builder

plugins » priority-sorter-plugin #2 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

plugins » priority-sorter-plugin #20 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

plugins » priority-sorter-plugin #21 SUCCESS
This pull request looks good

@oleg-nenashev
Copy link
Member

What about cache-alike approach? You can just recalculate the queue only once after the restart.

In my installation:

  • The build queue sometimes reaches 10000 items
  • Users like launching of 1-second multi-configuration jobs, so Jenkins' throughput reaches about 100 build completions per second
  • According to profiling, saving of queue is a main bottleneck. Additional saving in priority-sorter may significantly decrease throughput (needs to be evaluated)

@emsa23
Copy link
Contributor Author

emsa23 commented Nov 1, 2013

Ok, I understand the problem and will implement another solution.

Do you have any other consideration on the setup; any other major things need fixing?

@cloudbees-pull-request-builder

plugins » priority-sorter-plugin #22 FAILURE
Looks like there's a problem with this pull request

@cloudbees-pull-request-builder

plugins » priority-sorter-plugin #23 SUCCESS
This pull request looks good

@oleg-nenashev
Copy link
Member

PriorityConfiguration::get() returns null on start in my case. Saving of global configuration fails, many other methods may suffer as well

@emsa23
Copy link
Contributor Author

emsa23 commented Nov 3, 2013

Isn't that strange? I have seen that happen and I do not really understand how that can even happen ... ?

@oleg-nenashev
Copy link
Member

It may happen when the plugin goes to legacy mode, but somehow continues operating in AdvancedQueue. BTW, I cannot reproduce the issue after cleanup of "work" directory, so the issue may be related to switching between dev. versions

…plemented as describable items, but the config.jelly has not been implemented yet.

Signed-off-by: Oleg Nenashev <[email protected]>
@emsa23
Copy link
Contributor Author

emsa23 commented Nov 3, 2013

But even in Legacy mode all extension should be loaded I cannot see how this can happen.

I guess it has something to do with dev versions and incomplete deploys.

@cloudbees-pull-request-builder

plugins » priority-sorter-plugin #24 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

plugins » priority-sorter-plugin #25 SUCCESS
This pull request looks good

emsa23 added a commit that referenced this pull request Nov 11, 2013
Adding Different Queue Sorting Strategies and Strategies to assign Priorities to Jobs.
@emsa23 emsa23 merged commit 9394253 into jenkinsci:master Nov 11, 2013
@jglick jglick mentioned this pull request Jan 11, 2018

import jenkins.model.Jenkins;

import org.apache.tools.ant.ExtensionPoint;
Copy link
Member

Choose a reason for hiding this comment

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

#42

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.

6 participants