Registry cleanup advice

Hi all,

I am having problems in trying to reclaim space from the registry.

We are using Gitlab CE 15.3.3 as an all-in-one docker image (gitlab/gitlab-ce:15.3.3-ce.0).

I have setup the Clean up image tags from the GUI on large projects. It is set to run weekly and to only keep the last five tags. I also garbage collect with a cron job using go-crond to

  • set the cluster read-only
  • run: gitlab-ctl registry-garbage-collect
  • set the cluster back to read-write

Right now, we have a registry of 300G in S3 growing at a rate of about 500MB/day.

I realize that both the tags cleanup and the garbage collect are limited to about 30 minutes. Are 30 minutes enough to put any kind of dent into a registry that grows at such a rate? Can that default be changed?

I also know that the registry-garbage-collect has an option ‘-m’ which I think is more destructive and for which I am unclear what it does exactly, where could I find more in-depth documentation on that? As all Git repos, trashing its content is never a good thing so I’d rather know what I’m doing before enabling that option.

Thank you all for any help/advice you have for me.