History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-787
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Robin Shen
Reporter: Robin Shen
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Improve load balancing algorithm to make it distribute loads to grid nodes evenly and strictly

Created: 09/Jan/11 04:26 AM   Updated: 04/Oct/11 03:43 PM
Component/s: None
Affects Version/s: 3.1.15
Fix Version/s: 4.0.0-M2, 4.0.0

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
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.

 All   Comments   Work Log   Change History      Sort Order:
Don Ross [07/Sep/11 07:55 PM]
What is the new algorithm?

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.