-
Hi, I have several self-hosted runners (8 cores, and 4 cores machines) and would like to make sure that some machines are prioritized over others because these machines have stronger hardware. I am not sure tags are the right way to go here because I’d like to have all different jobs always prefer the group with 8 cores and only use the 4-core machines when there are no “fast” ones available. Any idea how to do that? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
If you set a job to run on the self-hosted runner with a specified label, the job will only use the available runners that have the specified label. By default, the repository runners have the priority to be used for the workflow jobs in a repository. If there is not available repository runners, the jobs will check Organization runners. To view more details, you can see “Routing precedence for self-hosted runners”. In your case, as a workaround, you can install the 8 cores runners as the repository runners and 4 cores runners as the Organization runners. More details, see “Adding self-hosted runners”. |
Beta Was this translation helpful? Give feedback.
-
Thanks @brightran for the reply. This would work for just two different classes of runners but is not viable anymore with more. On systems like Buildkite, you can configure a priority in combination with tags. It would be great to have this ability with self-hosted runners too. Perhaps a feature request? |
Beta Was this translation helpful? Give feedback.
-
Same problem here. We are dynamically provisioning / removing workers based on their activity. The problem is that because workloads are randomized, a lot more workers are live than there could be. |
Beta Was this translation helpful? Give feedback.
-
Looks like the above behavior is no longer active:
GitHub Actions: Changing the search order for self-hosted runners | GitHub...GitHub Actions: Changing the search order for self-hosted runners |
Beta Was this translation helpful? Give feedback.
@taschik,
If you set a job to run on the self-hosted runner with a specified label, the job will only use the available runners that have the specified label.
By default, the repository runners have the priority to be used for the workflow jobs in a repository. If there is not available repository runners, the jobs will check Organization runners. To view more details, you can see “Routing precedence for self-hosted runners”.
In your case, as a workaround, you can install the 8 cores run…