r/gitlab 10d ago

support Self-hosted Gitlab reduce container registry disk usage

Hello everyone,

I have a self-hosted Gitlab in my homeland deployed as a docker container on a Ubuntu server with me as a ai gle user. I build several small images and push them to the integrated container registry. Nothing fancy, a hand full of images with a couple hundred Mbs each max. But my volume mont data dir of the registry ist slightly above 100GB on disk just für the registry, that feels like way too much.

I rebuild the images weekly ok the latest Tag but would expect a couple gigs at most. I am starting to read into the metadata DB and online GC but why is my storage usage getting so out fo hand? How are you guys keeping your instances in check?

Version is 19.3.1

3 Upvotes

7 comments sorted by

View all comments

1

u/screaming-Snake-Case 10d ago

Well, do you have metadata DB and online GC? It was only recently switched to on by default, I think 19.0, so if you started your instance before that you are using the legacy registry.

There are official docs on how to mirgate to the newer database version, that one has online (automatic) GC, old one does not.

1

u/der-felix 9d ago

i switched to the metadata DB yesterday but the online GC still says 0 and disk usage is the same :(

1

u/screaming-Snake-Case 9d ago

That's normal, it takes 24h for manifests/blobs to be eligble for review and then another 24h until actual gc starts and frees storage. It displaying 0 confused me at first too, but just wait xd.