18

I have a set of build jobs in jenkins that can run in any one of 3 build nodes. They are all labeled with a common label of "ubuntu_build". Each of the nodes has a number of executors thus allowing some of the builds to execute in parallel on a machine. The setup is running fine and does what it is supposed to but I would like to improve it.

The 3 build nodes have varying performance. The first is twice as fast as the second which is twice as fast as the third. (call them fast_node, regular_node, slow_node)

As I understand the scheduling strategy, the machine that was used last for a given build job will be preferred the next time around. This can sometimes lead to issues when there are not many builds going through and the jobs were last built on slow_node and thus it keeps going there even though fast_node has some executors that could work.

What I would like is a way to say that for any job coming through the queue I would like it to try to find room on fast_node, then regular_node, then finally slow_node. (ie. try to keep using the fastest executor that is available)

Is there anyway to set something like this up?

Allen
  • 3,134
  • 5
  • 29
  • 49

2 Answers2

15

Based upon AltF4_ answer I looked again at the plugins and found The Scored Load Balancer Plugin. It looks like it could do even better than the Least Load Plugin. I am going to give it a try and see how it works out.

Allen
  • 3,134
  • 5
  • 29
  • 49
  • 1
    Scored Load Balancer works great. I think the Least Load Plugin would have as well, but this one does a bit better for us. – Allen Oct 20 '14 at 19:13
4

I was reading another question similar to this it was suggested there that you can use a plugin called "Least Load Plugin"

Summary

By default Jenkins tries to allocate a jobs to the last node is was executed on. This can result in nodes being left idle while other nodes are overloaded. This plugin overrides the default behavior and assigns jobs to nodes with the least load. The least load is defined as a node that is idle or the one with the most available executors. It is intended to provide the same functionality as the commercial plugin Even Scheduler Plugin.

Here is the link : https://wiki.jenkins-ci.org/display/JENKINS/Least+Load+Plugin

Source question: How can I modify the Load Balancing behavior Jenkins uses to control slaves?

Community
  • 1
  • 1
AltF4_
  • 2,312
  • 5
  • 36
  • 56
  • That looks like a great option. Not quite perfect, but I will get it a try and see how it works out. – Allen Sep 19 '14 at 00:56