Limiting the use of shared runners
Proposal
I would like to have some additional control on the usage of shared runners (on gitlab.com). In particular, limiting the amount of simultaneous jobs using shared runners may help balancing the use of shared and specific runners, and therefore the usage of CI/CD quotas.
Suppose I have a pipeline with 20 jobs, each of them takes 1 hour to finish, and suppose I have a single specific runner.
- If I disable shared runners, the pipeline will take 20 hours to finish, and I’ll be charged 0 hours of shared runner use (the specific runner runs every job).
- If I enable shared runners, 1 hour to finish, charged 19 hours (the specific runner runs one job).
If I could fine-tune the shared runner use, I could, for instance:
- Limit shared runners to 1 simultaneous job: 10 hours to finish, charged 10 hours (jobs run in pairs, one for the specific runner, one for a shared runner).
- Limit shared runners to 2 simultaneous jobs: ~7 hours to finish, charged ~14 hours (jobs run in trios, one specific, two shared).
- Add a second specific runner, and limit shared runners to 1 simultaneous job: ~7 hours to finish, charged ~7 hours (trios, two specific, one shared).
See also https://forum.gitlab.com/t/limiting-the-use-of-shared-runners/76183
@gitlab-bot label ~"type::feature::addition"
Edited by Jellby