Just an update - we found out that `gc.auto` and `gc.autoPackLimit` are indeed very important for the JGit config for Gerrit.
`gc.auto` defaults to 6700. We had it set to 20 for a long time (years) and didn't experience any issues with Gerrit's JGit GC. Last week, we tried changing it to 2000 (it wasn't clear why we'd ever set it to 20 - didn't have gerrit.config checkin to SCM historically), and all of a sudden disk usage went up drastically. The routine Gerrit JGit GC for some reason stopped repacking / optimizing the packfiles. Some of the busy repos started accumulating hundreds of packfiles and Gerrit GC would not optimize them. The `gc.log` file in these busy repos during a Gerrit GC run would say:
```
Too many loose, unpruneable objects after garbage collection. Consider adjusting gc.auto or gc.pruneExpire
```
We "fixed" these repos by simply running a `git gc` in them. Not clear to me why `git gc` trivially repacked correctly, but Gerrit's JGit GC would just not do that:
[2024-10-07 16:31:35,086] INFO : [my-repo] before: numberOfPackedRefs=264778, numberOfPackFiles=116, sizeOfLooseObjects=1571752, numberOfLooseObjects=820, numberOfPackedObjects=111730806, numberOfBitmaps=5152, numberOfLooseRefs=5, sizeOfPackedObjects=38368357392
[2024-10-07 16:38:48,106] INFO : [my-repo] after: numberOfPackedRefs=264782, numberOfPackFiles=121, sizeOfLooseObjects=1803370, numberOfLooseObjects=830, numberOfPackedObjects=116094265, numberOfBitmaps=5796, numberOfLooseRefs=7, sizeOfPackedObjects=39919702803