I have two gitlab runners, one is slower one is faster. Both runners have same tags and are locked to the same project. Currently new jobs seem to be random send to any available project runner.
I want to prefer / prioritize the faster gitlab runner for incoming new jobs if both are idle.
Sometimes it's annoying to see the slower runner working, while the faster one loops at idle.
Any suggestion?
The only thing i found is an old and still open issue at gitlab
https://gitlab.com/gitlab-org/gitlab/issues/14976
You could try to increase the check_interval on the slow runner so it would check for jobs less often than the faster runner and therefore the slow runner would pickup less jobs.
Runner configuration doc: https://docs.gitlab.com/runner/configuration/advanced-configuration.html
The answer right now is that it doesn't exist. As you've found the feature request for it, I recommend you upvote and add a comment to add your use case to the issue.
One possibility is to allow your faster runner to run more than one job. For example, set your slow runner to limit 1, and have your fast runner set to limit 2 or higher. Just make sure your concurrent (global) is not a number smaller than the total limits.
You can find more about setting limits and concurrent in the docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With