Hosting Gitlab in memory constraint environments

SebinnSebastian
May 27, 2022

--

Before deploying gitlab in a server,you should do the following,

  1. 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

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

SebinnSebastian
SebinnSebastian

Written by SebinnSebastian

DevOps Engineer | Redhat Certified System Administrator | K8s Administrator | AWS, Docker, Terraform, GCP

No responses yet

Write a response