Flag to run minimal GitLab configuration (to reduce RAM consumption)
Summary
GitLab can consume a significant amount of RAM, which is often the most expensive and limiting factor for running GitLab.
We do offer a variety of knobs and switches within Omnibus to reduce the configuration to only the absolutely minimum required services, however users have to figure out which settings are not necessary.
Proposal
We should reduce the effort required for users who would like to run a "minimal" GitLab configuration.
To do this, we could provide a single configuration flag which disables everything that is not required for the core operation of GitLab. This could include disabling services, like:
- Registry
- Mattermost (off by default)
- Prometheus monitoring services
- Other services we add in the future
This flag could be something like gitlab_minimal_configuration[enabled] = false
, near the top of gitlab.rb
.
Prior to actually doing the work however, we should make sure we capture a list of the services we ship by default with Omnibus and gather the memory they consume.
The reason is that we know GitLab itself (Rails) is by far the largest consumer of memory, and it may be that the additional optional services may not be a significant addition. If this is the case, we should consider whether this extra flag is worth the incremental overhead. (Both for ourselves in maintaining it, as well as clarity of instructions we provide to customers.)