We have some ongoing experiments with Unicorn memory limits on gitlab.com (please let me know if this is a duplicate issue). I am creating this issue as a reminder that we need to:
update Omnibus default memory limits and its worker count formula in attributes/default.rb
I was going to create a new issue, but this one already exists with good discussion. It's apparent that 2GB RAM with no swap doesn't work well with GitLab at the moment: lots of out of memory errors occur if you try to do anything (e.g. upgrade, backup, etc.). Sidekiq is capped at 1 GB, and 3 Unicorn workers consume about a 1 GB RAM without much activity. In addition to the items @jacobvosmaer-gitlab mentioned above, we need to:
Raise GitLab memory requirements from 2 GB + no swap -> 2 GB + some swap (or 4 GB)
I think a good goal for the end of the year is to bring the GitLab memory requirements back down under the 2 GB RAM mark.
@pcarranza Can we have a performance specialist handle the memory requirements overhaul for 8.12?
@ahmadsherif I'm assigning this to you as you are handling memory usage. Can you please update the documentation for the time being so it makes sense with what is actually needed now?
@pcarranza I tried applying some workload on a GitLab installation in a 2 GB droplet with no swap; 3 ruby scripts doing small pushes in parallel with 1 second pause between every push, along with brief browsing of the site itself. The droplet free memory went down kinda fast, to the point it caused 500 errors (due to workhorse not being able to run new processes) and/or 502 errors (because unicorn was killed as a whole). Adding a 1 GB swap helped eliminating the errors. Also tried higher workload (10 scripts instead of 3) on a 4 GB droplet with no swap, no 50x errors and the site feels OK, memory was decreasing but this time memory was reclaimed by (automatically) killing Sidekiq, unicron memory is kinda stagnant.
Should we update the docs to a minimum of 4 GB addressable memory?