Skip to content

Lower auto garbage collection limit in git

Even though GitLab ships git version 2.4.x the git auto thresholds are almost never reached and git gc --auto will never run or not that frequent.

This becomes a real issue with larger repositories and that's why I suggest to create a button which runs a git gc for the project repository.

Scheduling is not really an option because git gc won't make tiny projects or projects without any activity faster. Setting the thresholds lower does not work either because it will trigger much more projects as well which doesn't need a git gc perse.

A simple button is really easy to implement and it gives all project admins a chance to fix the project repository themselves. When the button is clicked a sidekiq job will be scheduled for the actually git gc run.

/cc @dzaporozhets @marin @DouweM @jacobvosmaer @sytses @yorickpeterse

/ref: https://github.com/gitlabhq/gitlabhq/pull/9322