Matheus Canon
Matheus Canon

Reputation: 125

Should I use single or multiple GitLab CI Runners for multiple projects?

I enabled GitLab CI on some projects and sometimes, when there are concurrency, it looks like the jobs queue up.

I'm using one specific runner for 10 or more projects.

Are there best practices when using GitLab CI runners for multiple projects? Should I use one or more runners for multiple projects?

Upvotes: 5

Views: 2838

Answers (1)

Vít Kotačka
Vít Kotačka

Reputation: 1612

If to use one or more runners for multiple projects, it depends on performance of your builds. Therefore, I would say there is no simple rule of thumb and it needs some tuning to find what suits you well.

You can scale your build in two ways:

  1. Increase concurrent value in /etc/gitlab-runner/config.toml from 1 to some higher number.
  2. Register more runners which are not locked to a specific repository.

I usually use a combination of both, but generally, my opinion is that the first approach (with a runner locked to repository) serves better bigger projects and the second approach is more suitable for couple of small, or middle-size repos.

Upvotes: 5

Related Questions