Prioritize agents

Hi guys,

Is there a way to assign priorities to agents? We have multiple build servers with quite different performance specs (I/O and CPU). We already added a role property to our agents to assign stages to specific agents but Continua CI seems to prioritize by hostname if multiple agents are suitable for a stage. The first stage of our main configuration is not limited to any agent and is always executed on the first online agent sorted by hostname. Is there a way to influence this handling somehow?

Kind regards

Kay Zumbusch

Hi Kay,

We have a chat this morning about how we could improve agent selection. Currently we use a round robin mechanism, that treats all agents as having the same capacity, and all stages workloads as equal. We realise this is fairly naive and we would like to in the end pull some metrics from agent machines based on how “busy” they are.

In the meantime however we believe we have an improvement we can implement over the round robin selection. It will take into consideration how many stages an agent can run (configurable in the agents tab). It should only take a short while to implement, I have no firm ETA for you as I am looking into another issue at present. It should be early next week however.

Hi Kay

Just a quick update on this - after our whiteboard session last week, Jason now has a working implementation with a new agent allocation algorithm and the results are quite pleasing to say the least. It’s also done in a way that we can add more inputs to the algorithm in the future (like cpu speeds, available memory etc). We hope to get this out in an update in the next week or two., Dave (the tech lead for Continua) is back from vacation tomorrow, he as lots of code to review/approve

Hi Kay,

We have now uploaded a new version which includes updates to the agent selection. This version prioritises agents with the highest remaining capacity based on the concurrent stage limit. e.g. ([concurrent stage limit] - [number of running stages]) / [concurrent stage limit]. Note that agents with unlimited concurrent stages are weighted based on having a concurrent stage limit one higher than the maximum of all limited agents.

Hi guys,

thanks for the update. In our case the implemented calculation would not help. Almost all our build agents are limited to a single concurrent stage as we do not want multiple builds to influence each other on the same machine. The only agent allowed to run multiple stages at the same time is the agent on the Continua CI server as all file operations like exporting artifacts to network shares are handled by this agent. A CPU and I/O rating based selection or a manual priority configuration would work better in our environment.

Kind regards

Kay Zumbusch