Hosting Gitlab in memory constraint environments
Before deploying gitlab in a server,you should do the following,
- Configure SWAP space
https://linuxize.com/post/how-to-add-swap-space-on-ubuntu-20-04/
Set How often SWAP uses;
sudo sysctl vm.swappiness=10
Edit /etc/sysctl.conf
to make it permanent
vm.swappiness=10
2. Edit /etc/gitlab/gitlab.rb
puma[‘worker_processes’] = 0
sidekiq[‘max_concurrency’] = 10
prometheus_monitoring[‘enable’] = false
gitaly[‘cgroups_count’] = 2
gitaly[‘cgroups_memory_limit’] = 500000
gitaly[‘concurrency’] = [
{
‘rpc’ => “/gitaly.SmartHTTPService/PostReceivePack”,
‘max_per_repo’ => 3
}, {
‘rpc’ => “/gitaly.SSHService/SSHUploadPack”,
‘max_per_repo’ => 3
}
]
3. After you made the changes reconfigure gitlab using command,
sudo gitlab-ctl reconfigure