<< Back to previous view

[QB-787] Improve load balancing algorithm to make it distribute loads to grid nodes evenly and strictly
Created: 09/Jan/11  Updated: 04/Oct/11

Status: Resolved
Project: QuickBuild
Component/s: None
Affects Version/s: 3.1.15
Fix Version/s: 4.0.0-M2, 4.0.0

Type: Improvement Priority: Major
Reporter: Robin Shen Assigned To: Robin Shen
Resolution: Fixed Votes: 1
Remaining Estimate: Unknown Time Spent: Unknown
Original Estimate: Unknown


 Description   
Currently the load balancing algorithm works like below when determine node to run a specific step:
1. calculate the set of matching nodes for a step.
2. if the set contains no node, report error.
3. if the set contains only one node, select that node.
4. if the set contains two or more nodes, QB continues to get the load of each node and select the least loaded node.

This algorithm has a drawback when multiple builds are set to run concurrently from a trigger build step: there is a latency between the time when master step of a build is assigned to a node (which happens at server side), and the time when the load of that node is updated to reflect that step (which happens at agent side when the step is executed). QuickBuild could assign multiple builds to the same agent as builds on that agent may not start to run and load of that agent is still calculated as 0.

For builds not started in the same time (which will hold true for most cases if builds are started manually or by different schedulers), this algorithm will work as expected.

 Comments   
Comment by Don Ross [ 07/Sep/11 07:55 PM ]
What is the new algorithm?
Comment by Robin Shen [ 08/Sep/11 12:03 AM ]
Now, an agent can run only steps from one build. Powerful machines may install multiple agents to run multiple builds concurrently. Also a benchmark index is calculated for each index so that build can be distributed to fast agent if multiple agents are idle.
Generated at Mon May 20 22:59:32 UTC 2024 using JIRA 189.