Uploaded image for project: 'Bitbucket Server'
  1. Bitbucket Server
  2. BSERV-13225

Improve Garbage collection in Bitbucket



    • Suggestion
    • Resolution: Unresolved
    • None
    • Git Hosting
    • None
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.


      Issue Summary

      The repository size grows from time to time. But the Garbage collection in Bitbucket fails to do the necessary cleanup. It's almost like the GC starts, but does nothing and the size grows every day.

      When we create a fork to the repository, delete it and does a dummy push, it triggers garbage collection in Bitbucket and it cleans up without deleting any necessary files. This saves a lot of space while the regular garbage collection cleans up very little space.

      Steps to Reproduce

      The issue was not reproducible in the test instance. But this was observed in the customer's production environment where there are thousands of repositories that are constantly used. 

      • We have more than 10k repositories in Bitbucket
      • More than 100 are larger than 1 GB

      Expected Results

      Bitbucket Garbage collection keeps their size in check.

      Actual Results

      There are no visible changes in size after Bitbucket Garbage collection get executed and the size of the repository keeps growing every day.

      From gc logs, we can see only the pack operations are performed. The other GC operations such as repack or prune operations are not performed.


      Create a fork to the repository, delete it and do a dummy push. This will trigger the prune operation and can reduce the size considerably, without removing any wanted files.


        Issue Links



              Unassigned Unassigned
              46ac2648bc84 Naveen
              1 Vote for this issue
              3 Start watching this issue