Agent Priory for Large Agent Pools
It is configurable to have some agents have more weight than others for large agent pools? Meaning, TC would assign a build to agent with greater weight (or ranking) to build first before randomly picking others in the pool if those with high weight are in use.
Just observing when TC assigns agents for builds in our large, 20 agent pool, it's pretty random with no pattern that I've observed.
All 20 agents are close to being identical with exception that 4 of the 20 have double the number of CPUs. (We run one TC agent per VM.) Two SW products would benefit running on the agents with double the CPUs so would want to have the other build projects use the lesser CPU agents first before assigning builds to the greater CPU agents.
Please sign in to leave a comment.
TeamCity prioritizes assigning builds to the fastest available agent using the following metrics:
If no builds have previously run on agents, the CPU rank is used to select an agent.
If builds have previously run on agents, the estimated build duration for the given build configuration is used to select an agent. The estimate is made based on the heuristics of the latest builds in the history of the build configuration; for estimating, the execution time of the more recent builds has more weight than that of the earlier builds. Personal and canceled builds are not taken into account, nor are any individual builds whose duration differs significantly from the rest of the builds for this build configuration.
It is not currently possible to change this prioritization policy. We do, however, have a related feature request here: TW-23336. Please take a look at this feature request to ensure that it would fit your use case. You can leave a vote/comment to share your interest and to be automatically notified of any updates to the feature. Our developers use the information on our YouTrack to determine which features are included in future releases, so your feedback there would be appreciated.